Hey, I try to cast an class that extends the ItemStack class but when I try to cast it I got this error java class org.bukkit.inventory.ItemStack cannot be cast to class fr.thesky.weit.CustomItem (org.bukkit.inventory.ItemStack is in unnamed module of loader java.net.URLClassLoader @18769467; fr.thesky.weit.CustomItem is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @3d8c590e)
#cast an ItemStack to a custom class
1 messages · Page 1 of 1 (latest)
so how can I do?
it just add a simple way to edit and set an PersistantDataContainer
Well you don’t need a custom class for that
Just make some methods that take in an itemstack
yes but how? I add it to another class and I give the itemstack to the methods all times?
What?
like an java public class foo { public static void edit(ItemStack stack) { ... } }