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.void
serialize
(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, wait
Methods inherited from interface dev.crafty.core.config.serializers.ConfigSerializer
deserialize, serialize
-
Constructor Details
-
LocationSerializer
public LocationSerializer()
-
-
Method Details
-
getTargetClass
Description copied from interface:ConfigSerializer
Get the class that this serializer handles.- Specified by:
getTargetClass
in 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:ConfigSerializer
Serialize an object to a MemoryConfiguration. Simply call config.set(key, value) for each field you want to serialize.- Specified by:
serialize
in interfaceConfigSerializer<org.bukkit.Location>
- Parameters:
toSerialize
- The object to serializeconfig
- The blank MemoryConfiguration to write to
-
deserialize
Description copied from interface:ConfigSerializer
Deserialize an object from a SectionWrapper.- Specified by:
deserialize
in interfaceConfigSerializer<org.bukkit.Location>
- Parameters:
from
- The SectionWrapper containing the serialized data- Returns:
- The deserialized object
-