diff --git a/pom.xml b/pom.xml index de6e00e..df0657a 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.artillexstudios AxSellwands - 1.3.2 + 1.3.3 jar AxSellwands @@ -156,7 +156,7 @@ com.artillexstudios.axapi axapi - 1.4.236 + 1.4.238 compile all diff --git a/src/main/java/com/artillexstudios/axsellwands/utils/NBTUtils.java b/src/main/java/com/artillexstudios/axsellwands/utils/NBTUtils.java index 300f544..b6bd4d2 100644 --- a/src/main/java/com/artillexstudios/axsellwands/utils/NBTUtils.java +++ b/src/main/java/com/artillexstudios/axsellwands/utils/NBTUtils.java @@ -1,7 +1,7 @@ package com.artillexstudios.axsellwands.utils; import com.artillexstudios.axapi.items.WrappedItemStack; -import com.artillexstudios.axapi.items.component.DataComponent; +import com.artillexstudios.axapi.items.component.DataComponents; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -12,115 +12,115 @@ public class NBTUtils { public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, @NotNull String content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putString(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, int content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putInt(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, boolean content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putBoolean(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, double content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putDouble(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, long content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putLong(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, float content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putFloat(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static void writeToNBT(@NotNull ItemStack item, @NotNull String namespace, UUID content) { WrappedItemStack.edit(item, wrappedItemStack -> { - var customData = wrappedItemStack.get(DataComponent.CUSTOM_DATA); + var customData = wrappedItemStack.get(DataComponents.customData()); customData.putUUID(namespace, content); - wrappedItemStack.set(DataComponent.CUSTOM_DATA, customData); + wrappedItemStack.set(DataComponents.customData(), customData); return wrappedItemStack; }); } public static boolean containsNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).contains(namespace); + return wrappedItemStack.get(DataComponents.customData()).contains(namespace); }); } @Nullable public static String readStringFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - final String str = wrappedItemStack.get(DataComponent.CUSTOM_DATA).getString(namespace); + final String str = wrappedItemStack.get(DataComponents.customData()).getString(namespace); return str.isEmpty() ? null : str; }); } public static int readIntegerFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getInt(namespace); + return wrappedItemStack.get(DataComponents.customData()).getInt(namespace); }); } public static float readFloatFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getFloat(namespace); + return wrappedItemStack.get(DataComponents.customData()).getFloat(namespace); }); } public static long readLongFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getLong(namespace); + return wrappedItemStack.get(DataComponents.customData()).getLong(namespace); }); } public static double readDoubleFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getDouble(namespace); + return wrappedItemStack.get(DataComponents.customData()).getDouble(namespace); }); } @Nullable public static UUID readUUIDFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getUUID(namespace); + return wrappedItemStack.get(DataComponents.customData()).getUUID(namespace); }); } public static boolean readBooleanFromNBT(@NotNull ItemStack item, @NotNull String namespace) { return WrappedItemStack.edit(item, wrappedItemStack -> { - return wrappedItemStack.get(DataComponent.CUSTOM_DATA).getBoolean(namespace); + return wrappedItemStack.get(DataComponents.customData()).getBoolean(namespace); }); } } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 0b73cf2..670bea8 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,3 +1,5 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html + prefix: "AxSellwands &7» " # modes: diff --git a/src/main/resources/hooks.yml b/src/main/resources/hooks.yml index db0f1cb..ed5cb32 100644 --- a/src/main/resources/hooks.yml +++ b/src/main/resources/hooks.yml @@ -1,3 +1,5 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html + # what plugin to use for these things? # if you need another plugin supported, please contact us on discord # Note: custom should only be used if you have a plugin that uses the API to add a custom hook diff --git a/src/main/resources/lang.yml b/src/main/resources/lang.yml index b842605..7fb3f4f 100644 --- a/src/main/resources/lang.yml +++ b/src/main/resources/lang.yml @@ -1,3 +1,5 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html + help: - " " - "&#FF5500&lAxSellwands &7»" diff --git a/src/main/resources/prices.yml b/src/main/resources/prices.yml index 0bf5fd3..da95862 100644 --- a/src/main/resources/prices.yml +++ b/src/main/resources/prices.yml @@ -1,3 +1,4 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html # NOTE: this file is only useful if you use the builtin price system # format: MATERIAL: price diff --git a/src/main/resources/sellwands/container-sellwand.yml b/src/main/resources/sellwands/container-sellwand.yml index 5de5a38..3b47e96 100644 --- a/src/main/resources/sellwands/container-sellwand.yml +++ b/src/main/resources/sellwands/container-sellwand.yml @@ -1,3 +1,6 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html +# ITEM BUILDER: https://docs.artillex-studios.com/item-builder.html + name: "⊗FFEnderChest Sellwand" item: diff --git a/src/main/resources/sellwands/normal-sellwand.yml b/src/main/resources/sellwands/normal-sellwand.yml index ab1c2e1..0aa0593 100644 --- a/src/main/resources/sellwands/normal-sellwand.yml +++ b/src/main/resources/sellwands/normal-sellwand.yml @@ -1,3 +1,6 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html +# ITEM BUILDER: https://docs.artillex-studios.com/item-builder.html + name: "&#FF5500Normal Sellwand" item: diff --git a/src/main/resources/sellwands/unlimited-sellwand.yml b/src/main/resources/sellwands/unlimited-sellwand.yml index 871d342..0696b27 100644 --- a/src/main/resources/sellwands/unlimited-sellwand.yml +++ b/src/main/resources/sellwands/unlimited-sellwand.yml @@ -1,3 +1,6 @@ +# DOCUMENTATION: https://docs.artillex-studios.com/axsellwands.html +# ITEM BUILDER: https://docs.artillex-studios.com/item-builder.html + name: "&#EE0000Unlimited Sellwand" item: