Package me.deecaad.core.file.serializers
Class ItemSerializer
java.lang.Object
me.deecaad.core.file.serializers.ItemSerializer
- All Implemented Interfaces:
Serializer<org.bukkit.inventory.ItemStack>
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid@Nullable org.bukkit.inventory.ItemStackattemptInline(@NotNull me.deecaad.core.file.SerializeData data) @NotNull org.bukkit.inventory.ItemStackserialize(@NotNull me.deecaad.core.file.SerializeData data) Instantiates a new Object to be added into the finalized configuration.org.bukkit.inventory.ItemStackserializeRecipe(me.deecaad.core.file.SerializeData data, org.bukkit.inventory.ItemStack itemStack) org.bukkit.inventory.ItemStackserializeWithoutRecipe(@NotNull me.deecaad.core.file.SerializeData data) org.bukkit.inventory.ItemStackserializeWithTags(@NotNull me.deecaad.core.file.SerializeData data, @NotNull Map<String, Object> tags) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getKeyword, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Field Details
-
ITEM_REGISTRY
-
-
Constructor Details
-
ItemSerializer
public ItemSerializer()Empty constructor to be used as serializer
-
-
Method Details
-
serialize
@NotNull public @NotNull org.bukkit.inventory.ItemStack serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException Description copied from interface:SerializerInstantiates a new Object to be added into the finalized configuration. The object should be built off ofSerializeData.getConfig(). If there is any misconfiguration (or any other issue preventing the construction of an object), then this method should throw aSerializerException. This method may not return null.- Specified by:
serializein interfaceSerializer<org.bukkit.inventory.ItemStack>- Parameters:
data- The non-null data containing config- Returns:
- The non-null serialized data.
- Throws:
me.deecaad.core.file.SerializerException- If there is an error in config.
-
serializeWithTags
public org.bukkit.inventory.ItemStack serializeWithTags(@NotNull @NotNull me.deecaad.core.file.SerializeData data, @NotNull @NotNull Map<String, Object> tags) throws me.deecaad.core.file.SerializerException- Throws:
me.deecaad.core.file.SerializerException
-
applyTags
-
attemptInline
@Nullable public @Nullable org.bukkit.inventory.ItemStack attemptInline(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Throws:
me.deecaad.core.file.SerializerException
-
serializeWithoutRecipe
public org.bukkit.inventory.ItemStack serializeWithoutRecipe(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Throws:
me.deecaad.core.file.SerializerException
-
serializeRecipe
public org.bukkit.inventory.ItemStack serializeRecipe(me.deecaad.core.file.SerializeData data, org.bukkit.inventory.ItemStack itemStack) throws me.deecaad.core.file.SerializerException - Throws:
me.deecaad.core.file.SerializerException
-