Help with checking inventory

Discussion in 'Plugin Development' started by Нейн, May 31, 2023.

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

    Нейн

    Hi all!
    I want to change the name of the item while it is in the player's inventory (and at the same time create a BossBar for the player who has this item in the inventory)
    I didn’t understand how to implement this, I tried InventoryInteractEvent and InventoryEvent, but they stupidly have 0 reactions to any interaction with the inventory ...

    My code is https://pastebin.com/V2Mfhcc4
    Event Initializer - https://pastebin.com/Hf1wmNnt

    Thanks!
     
  2. Offline

    timtower Administrator Administrator Moderator

    @Нейн And why are you using that method to load your events?
    Use a BukkitRunnable with runTaskTimer for that stuff.
     
  3. Offline

    KarimAKL

    @Нейн You're most likely looking for the InventoryClickEvent, which is a subclass of the InventoryInteractEvent. Superclass events are usually not called.
     
Thread Status:
Not open for further replies.

Share This Page