Fix my derp
This commit is contained in:
parent
521b1e5f3b
commit
1ca23390cc
@ -277,7 +277,7 @@ public class CompassAddon extends MiniPlugin
|
|||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
public void onInventoryClick(InventoryClickEvent event)
|
public void onInventoryClick(InventoryClickEvent event)
|
||||||
{
|
{
|
||||||
if (event.getClickedInventory() != null && event.getWhoClicked() != null && event.getWhoClicked().getGameMode() == GameMode.CREATIVE && event.getClickedInventory().getTitle().equals("Spectate Menu"))
|
if (event.getClickedInventory() != null && event.getWhoClicked() != null && event.getWhoClicked().getGameMode() == GameMode.CREATIVE && event.getClickedInventory().getTitle().equals("Spectator Menu"))
|
||||||
{
|
{
|
||||||
event.setCancelled(false);
|
event.setCancelled(false);
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,10 @@ public class MiscManager implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void InventoryClickClose(InventoryClickEvent event)
|
public void InventoryClickClose(InventoryClickEvent event)
|
||||||
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
Player player = UtilPlayer.searchExact(event.getWhoClicked().getName());
|
Player player = UtilPlayer.searchExact(event.getWhoClicked().getName());
|
||||||
if (player == null)
|
if (player == null)
|
||||||
@ -101,6 +103,7 @@ public class MiscManager implements Listener
|
|||||||
if (event.getClickedInventory().getViewers().contains(player))
|
if (event.getClickedInventory().getViewers().contains(player))
|
||||||
player.closeInventory();
|
player.closeInventory();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void addClockPrevent(InventoryOpenEvent event)
|
public void addClockPrevent(InventoryOpenEvent event)
|
||||||
|
Loading…
Reference in New Issue
Block a user