Merge pull request '2.8.14 | Bugfix: Player-Inv-Click' (#16) from 2.8.14-DEV into main

Reviewed-on: #16
This commit is contained in:
JaTiTV 2022-12-22 01:07:14 +00:00
commit 2f3c555195
2 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId> <artifactId>CommandGUI_V2</artifactId>
<version>2.8.13</version> <version>2.8.14</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>CommandGUI</name> <name>CommandGUI</name>

View File

@ -48,6 +48,9 @@ public class GUIListener implements Listener {
if (player.getOpenInventory().getTitle().equals(T2Creplace.replace(prefix, GUICode + gui.guiName)) if (player.getOpenInventory().getTitle().equals(T2Creplace.replace(prefix, GUICode + gui.guiName))
|| (Main.PaPi && player.getOpenInventory().getTitle().equals(T2Creplace.replace(prefix, player, GUICode + gui.guiName)))) { || (Main.PaPi && player.getOpenInventory().getTitle().equals(T2Creplace.replace(prefix, player, GUICode + gui.guiName)))) {
e.setCancelled(true); e.setCancelled(true);
if (player.getOpenInventory().getTopInventory() != e.getClickedInventory()) {
continue;
}
for (Slot slot : gui.slots) { for (Slot slot : gui.slots) {
execute(e, slot, player, gui); execute(e, slot, player, gui);
} }