diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java index b773d6e5..6c9b7942 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java @@ -14,6 +14,7 @@ public class PlayerDeathEvent extends EntityDeathEvent { private int newLevel = 0; private int newTotalExp = 0; private boolean keepLevel = false; + private boolean keepInventory = false; public PlayerDeathEvent(final Player player, final List<ItemStack> drops, final int droppedExp, final String deathMessage) { this(player, drops, droppedExp, 0, deathMessage); @@ -135,4 +136,22 @@ public class PlayerDeathEvent extends EntityDeathEvent { public void setKeepLevel(boolean keepLevel) { this.keepLevel = keepLevel; } + + /** + * Sets if the Player keeps inventory on death. + * + * @param keepInventory True to keep the inventory + */ + public void setKeepInventory(boolean keepInventory) { + this.keepInventory = keepInventory; + } + + /** + * Gets if the Player keeps inventory on death. + * + * @return True if the player keeps inventory on death + */ + public boolean getKeepInventory() { + return keepInventory; + } } |