Package dev.demeng.pluginbase.model
Class Position
java.lang.Object
dev.demeng.pluginbase.model.Position
- All Implemented Interfaces:
YamlSerializable
An immutable and serializable Location object without the yaw or pitch.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Positiondeserialize(@NotNull org.bukkit.configuration.ConfigurationSection section) static @NotNull Positionof(@NotNull org.bukkit.Location loc) voidserialize(@NotNull org.bukkit.configuration.ConfigurationSection section) Serializes the object into the configuration section.@NotNull org.bukkit.LocationConverts the position to a BukkitLocation.
-
Constructor Details
-
Position
public Position()
-
-
Method Details
-
of
-
serialize
public void serialize(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section) Description copied from interface:YamlSerializableSerializes the object into the configuration section. The configuration file is not saved after serialization.- Specified by:
serializein interfaceYamlSerializable- Parameters:
section- The section the object will be serialized into
-
deserialize
@NotNull public static @NotNull Position deserialize(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section) -
toLocation
@NotNull public @NotNull org.bukkit.Location toLocation()Converts the position to a BukkitLocation.- Returns:
- The Bukkit Location
-