1
0
mirror of https://github.com/nkomarn/harbor.git synced 2024-12-18 22:37:36 +01:00

GUIEvent Merge

This commit is contained in:
BuildTools 2019-05-08 07:22:22 -07:00
parent cf7d258738
commit 659c850169

View File

@ -12,12 +12,8 @@ public class GUIEvent implements Listener {
@EventHandler
public void onClick(InventoryClickEvent event) {
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
<<<<<<< HEAD
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
=======
Player p = ((Player) event.getWhoClicked());
GUIType t = ((GUIHolder) event.getInventory().getHolder()).getType();
>>>>>>> 0f80c831f481f11d5588813b6391b9162173782a
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
}
}
@ -25,12 +21,8 @@ public class GUIEvent implements Listener {
@EventHandler
public void onDrag(InventoryDragEvent event) {
if (event.getInventory().getHolder() != null && event.getInventory().getHolder() instanceof Holder) {
<<<<<<< HEAD
GUIType t = ((Holder) event.getInventory().getHolder()).getType();
=======
Player p = ((Player) event.getWhoClicked());
GUIType t = ((GUIHolder) event.getInventory().getHolder()).getType();
>>>>>>> 0f80c831f481f11d5588813b6391b9162173782a
if (t.equals(GUIType.SLEEPING)) event.setCancelled(true);
}
}