64 checkState(player !=
null,
"Player does not exist.");
70 if (player.isDead()) {
74 switch (packet.getOpcode()) {
76 case FIRST_ITEM_OPTION:
77 handleFirstOption(player, packet);
80 case SECOND_ITEM_OPTION:
81 handleSecondOption(player, packet);
84 case THIRD_ITEM_OPTION:
85 handleThirdOption(player, packet);
96 switch (interfaceId) {
98 player.forClan(channel -> channel.getShowcase().select(player,
id, slot));
101 final Item item = player.inventory.
get(slot);
103 if (item ==
null || item.getId() !=
id) {
107 if (EventDispatcher.execute(player,
new FirstItemClickInteractionEvent(item, slot))) {
115 if (player.mysteryBox.click(item)) {
119 PluginManager.getDataBus().publish(player,
new ItemClickEvent(1, item, slot));
129 switch (interfaceId) {
131 final Item item = player.inventory.get(slot);
133 if (item ==
null || item.getId() != itemId) {
155 switch (interfaceId) {
157 Item item = player.inventory.get(slot);
159 if (item ==
null || item.getId() != itemId) {