Extending ItemStack and replacing Bukkit ItemStack

Discussion in 'Plugin Development' started by silthus, Aug 23, 2013.

Thread Status:
Not open for further replies.
  1. Offline


    Hi there,

    does anyone know if it is possible to replace the Bukkit ItemStack with a self constructed ItemStack?
    For example I have a CustomItemStack class that extends the Bukkit ItemStack class and overrides getMaxStacksize(). But when I give the player the CustomItemStack (add it to inventory) it is replaced by the Bukkit Item Stack.

    Is it possible, thru NMS hacking or Protocols to pass thru my own item stack and have that getMaxStacksize() method carry thru?

    Thanks in advance for any help!
  2. Offline


    Just add event handler for that and handle every event that happens with inventory and make your own custom codes for that.
    It's a lot of work but i think that that is the best way.

    You can also customize bukkit...
Thread Status:
Not open for further replies.

Share This Page