1.9.2 - InventoryClickEvent doesn't fire in some inventories

Discussion in 'Plugin Development' started by nathanthesnooper, Feb 2, 2018.

Thread Status:
Not open for further replies.
  1. This inventory works: https://i.imgur.com/5LRFLiF.png
    This one does not: https://i.imgur.com/ZDwxiZK.png

    Code:
    @EventHandler (priority = EventPriority.HIGHEST)
    public void inventoryClickEvent (InventoryClickEvent event) {
      
        event.getWhoClicked().sendMessage("InventoryClickEvent");
      
    }
    Should I make a bug report?
     
  2. Offline

    Zombie_Striker

    @nathanthesnooper
    Can you post the code you used to open the second inventory? Does it happen with only that inventory instance, or does this happen with other inventories as well?
     
  3. Code:
    public Inventory getPlayerCategoryShop (Player p, ItemCategory category) {
      
        Inventory i = Bukkit.createInventory(p, 54, "Shop");
      
        // Setting Items
      
        return i;
      
    }
    And of course using p.openInventory(getPlayerCategoryShop(p, ItemCategory.DEFAULT));
     
  4. Offline

    Zombie_Striker

    @nathanthesnooper
    Have you tested this on a server with no other plugins, in case there is a conflict?
     
  5. @Zombie_Striker I removed all the plugins I could without removing a ton of features on my plugin, and I am left with this:
    ViaVersion, Votifier, VoidWorld, ProtocolLib, Multiverse-Core

    The problem still persists (I doubt any of these plugins cause any issues)

    It should be noted that the problem arose when I downgraded my server to 1.9.2 from 1.12.2
     
  6. Offline

    Zombie_Striker

    @nathanthesnooper
    There may be a conflict with ViaVersion or ProtocolLib (both of which interact with packets). Try temporarily removing them and see if the problem still exists.
     
  7. Removing both doesn't seem to fix the issue... :'( I will most likely upgrade back to 1.12.2 and use ViaBackwards
     
  8. Online

    timtower Administrator Administrator Moderator

    Locked
    Protocol hacks are not supported by Bukkit
     
Thread Status:
Not open for further replies.

Share This Page