Skip to content

Commit

Permalink
no idea why we were doing that
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicbo committed Sep 5, 2020
1 parent ed60a68 commit 57a4342
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/me/nicbo/invadedlandsevents/listeners/GeneralListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,13 @@ public void onJoin(PlayerJoinEvent event) {

@EventHandler(priority = EventPriority.MONITOR)
public void onLeave(PlayerQuitEvent event) {
Player player = event.getPlayer();
GUI gui = GUI.getOpenInventories().get(player);
if (gui != null) {
GUI.getOpenInventories().remove(player);
}
GUI.getOpenInventories().remove(event.getPlayer());
}

@EventHandler(priority = EventPriority.MONITOR)
public void onInventoryClose(InventoryCloseEvent event) {
if (event.getPlayer() instanceof Player) {
Player player = (Player) event.getPlayer();
GUI gui = GUI.getOpenInventories().get(player);
if (gui != null) {
GUI.getOpenInventories().remove(player);
}
GUI.getOpenInventories().remove((Player) event.getPlayer());
}
}

Expand Down

0 comments on commit 57a4342

Please sign in to comment.