Class LocationSerializer

java.lang.Object
dev.crafty.core.config.serializer.builtin.LocationSerializer
All Implemented Interfaces:
ConfigSerializer<org.bukkit.Location>

public class LocationSerializer extends Object implements ConfigSerializer<org.bukkit.Location>
Since:
1.0.9
  • Constructor Details

    • LocationSerializer

      public LocationSerializer()
  • Method Details

    • serialize

      public void serialize(ConfigSerializer.SerializationArgs<org.bukkit.Location> args)
      Description copied from interface: ConfigSerializer
      Serialize an object to a configuration section.
      Specified by:
      serialize in interface ConfigSerializer<org.bukkit.Location>
      Parameters:
      args - The serialization arguments
    • deserialize

      public Optional<org.bukkit.Location> deserialize(SectionWrapper section, String path)
      Description copied from interface: ConfigSerializer
      Deserialize an object from a configuration section.
      Specified by:
      deserialize in interface ConfigSerializer<org.bukkit.Location>
      Parameters:
      section - The configuration section to deserialize from
      path - The path within the section to deserialize from
      Returns:
      The deserialized object
    • getType

      public Class<org.bukkit.Location> getType()
      Description copied from interface: ConfigSerializer
      Get the type of object this serializer handles.
      Specified by:
      getType in interface ConfigSerializer<org.bukkit.Location>
      Returns:
      The class of the object type