Class Point

java.lang.Object
dev.demeng.pluginbase.model.Point
All Implemented Interfaces:
YamlSerializable

public class Point extends Object implements YamlSerializable
An immutable and serializable Location object, including the yaw and pitch.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull Point
    deserialize(@NotNull org.bukkit.configuration.ConfigurationSection section)
     
    static @NotNull Point
    of(@NotNull org.bukkit.Location loc)
     
    void
    serialize(@NotNull org.bukkit.configuration.ConfigurationSection section)
    Serializes the object into the configuration section.
    @NotNull org.bukkit.Location
    Converts the point to a Bukkit Location.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Point

      public Point()
  • Method Details

    • of

      @NotNull public static @NotNull Point of(@NotNull @NotNull org.bukkit.Location loc)
    • serialize

      public void serialize(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section)
      Description copied from interface: YamlSerializable
      Serializes the object into the configuration section. The configuration file is not saved after serialization.
      Specified by:
      serialize in interface YamlSerializable
      Parameters:
      section - The section the object will be serialized into
    • deserialize

      @NotNull public static @NotNull Point deserialize(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section)
    • toLocation

      @NotNull public @NotNull org.bukkit.Location toLocation()
      Converts the point to a Bukkit Location.
      Returns:
      The Bukkit Location