Skip to content

Commit 8ba85e1

Browse files
committed
Fix DemoGUI bug
1 parent 51477aa commit 8ba85e1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/main/java/com/mohistmc/api/gui/DemoGUI.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.bukkit.Material;
77
import org.bukkit.entity.Player;
88
import org.bukkit.event.inventory.ClickType;
9+
import org.bukkit.event.inventory.InventoryCloseEvent;
910
import org.bukkit.inventory.ItemStack;
1011

1112
public class DemoGUI {
@@ -32,7 +33,9 @@ public DemoGUI(String name) {
3233
.toItemStack()) {
3334
@Override
3435
public void ClickAction(ClickType type, Player u, ItemStack itemStack) {
35-
u.closeInventory();
36+
if (!type.isShiftClick() && type.isLeftClick()) {
37+
u.closeInventory();
38+
}
3639
}
3740
});
3841
}

0 commit comments

Comments
 (0)