Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-3125

InventoryOpenEvent won't call when opening own player inventory

XMLWordPrintable

      If a player opens his own inventory, nothing will happen.
      Opening other inventories (tested with a chest and furnace) work fine.

      Example code (same as in attachment):

      public class Main extends JavaPlugin implements Listener {
      
          public void onEnable() {
              Bukkit.getPluginManager().registerEvents(this, this);
          }
      
          public void onDisable() {
      
          }
      
          @EventHandler
          public void inventoryOpen(InventoryOpenEvent e) {
              e.getPlayer().sendMessage("You opened (name): " + e.getInventory().getName());
              e.getPlayer().sendMessage("You opened (title): " + e.getInventory().getName());
              e.getPlayer().sendMessage("You opened (type): " + e.getInventory().getType().toString());
          }
      }
      
      

       

            Unassigned Unassigned
            mickedplay mickedplay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: