Solved ClickType not working

Discussion in 'Spigot Plugin Development' started by swendel, Feb 23, 2020.

  1. i'm using this code and it doesn't work when i left shift click an item. does anyone know why?
    Code (Java):
    @EventHandler(priority = EventPriority.HIGHEST)
        public void inventoryClick(InventoryClickEvent event) {
            Player player = (Player) event.getWhoClicked();
            if(event.isCancelled()) return;
            if(event.getSlotType().equals(SlotType.ARMOR)) {
                player.sendMessage("SLot work");
                if(event.getClick() == ClickType.SHIFT_LEFT) {
                    player.sendMessage("SHIFT");
                } else {
                    player.sendMessage("NOT");
                }
            }
        }
    [​IMG]
     
  2. Are you in creative? It doesnt work in creative.
     
  3. thank you i didnt know this
     
    • Friendly Friendly x 1