Class LocationSerializer
java.lang.Object
dev.crafty.core.config.serializers.LocationSerializer
- All Implemented Interfaces:
de.exlll.configlib.Serializer<org.bukkit.Location,,Map<String, Object>> ConfigSerializer<org.bukkit.Location>
Serializer for Location objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.bukkit.Location> deserialize(SectionWrapper from) Deserialize an object from a SectionWrapper.Class<org.bukkit.Location> Get the class that this serializer handles.voidserialize(org.bukkit.Location toSerialize, org.bukkit.configuration.MemoryConfiguration config) Serialize an object to a MemoryConfiguration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.crafty.core.config.serializers.ConfigSerializer
deserialize, serialize
-
Constructor Details
-
LocationSerializer
public LocationSerializer()
-
-
Method Details
-
getTargetClass
Description copied from interface:ConfigSerializerGet the class that this serializer handles.- Specified by:
getTargetClassin interfaceConfigSerializer<org.bukkit.Location>- Returns:
- The target class
-
serialize
public void serialize(org.bukkit.Location toSerialize, org.bukkit.configuration.MemoryConfiguration config) Description copied from interface:ConfigSerializerSerialize an object to a MemoryConfiguration. Simply call config.set(key, value) for each field you want to serialize.- Specified by:
serializein interfaceConfigSerializer<org.bukkit.Location>- Parameters:
toSerialize- The object to serializeconfig- The blank MemoryConfiguration to write to
-
deserialize
Description copied from interface:ConfigSerializerDeserialize an object from a SectionWrapper.- Specified by:
deserializein interfaceConfigSerializer<org.bukkit.Location>- Parameters:
from- The SectionWrapper containing the serialized data- Returns:
- The deserialized object
-