Skip to content

Commit

Permalink
closes NiklasEi/connectfour-for-gamebox#1 by adding an option to not …
Browse files Browse the repository at this point in the history
…close the inventory on player damage
  • Loading branch information
NiklasEi committed Jun 11, 2017
1 parent c06e271 commit 2f8dafe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/me/nikl/gamebox/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,8 @@ public void onPickUp(PlayerPickupItemEvent playerPickupItemEvent){

@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerDeath(PlayerDeathEvent event){
// close inv on death. This will trigger a restore of the inventory contents
// drops can then be handled by later listeners and option 'keepInventory'
if(isInGame(event.getEntity().getUniqueId()) || guiManager.isInGUI(event.getEntity().getUniqueId()) || guiManager.getShopManager().inShop(event.getEntity().getUniqueId())){
event.getEntity().closeInventory();
plugin.getLogger().log(Level.SEVERE, " Player in-game in death event!");
}
}

Expand Down

0 comments on commit 2f8dafe

Please sign in to comment.