Class ChestListMenuListener

java.lang.Object
com.enhancedechest.listener.ChestListMenuListener
All Implemented Interfaces:
org.bukkit.event.Listener

public final class ChestListMenuListener extends Object implements org.bukkit.event.Listener
Drives the simple 27-slot /eclist inventory menu (ChestListHolder). The menu is a read-only chooser: every click and drag on it is cancelled so its display icons can never be taken and items can never be dumped into the empty cells, and clicking a chest icon opens that chest — sharing the live session through ChestOpener.openChest(org.bukkit.entity.Player, int, org.bukkit.Location) exactly like the dialog and right-click paths.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onClick(org.bukkit.event.inventory.InventoryClickEvent event)
    Cancels every click while the chooser is open (whichever inventory was clicked, so shift-click and double-click-collect can't pull the player's own items into it either) and, when the click landed on a chest icon in the menu itself, opens that chest.
    void
    onDrag(org.bukkit.event.inventory.InventoryDragEvent event)
    Rejects any drag on the chooser — nothing may be placed into it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ChestListMenuListener

      public ChestListMenuListener()
  • Method Details

    • onClick

      public void onClick(org.bukkit.event.inventory.InventoryClickEvent event)
      Cancels every click while the chooser is open (whichever inventory was clicked, so shift-click and double-click-collect can't pull the player's own items into it either) and, when the click landed on a chest icon in the menu itself, opens that chest.
    • onDrag

      public void onDrag(org.bukkit.event.inventory.InventoryDragEvent event)
      Rejects any drag on the chooser — nothing may be placed into it.