summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
index 84c9fc489..6cae113d9 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsuicide.java
@@ -19,8 +19,12 @@ public class Commandsuicide extends EssentialsCommand
EntityDamageEvent ede = new EntityDamageEvent(user.getBase(), EntityDamageEvent.DamageCause.SUICIDE, Short.MAX_VALUE);
server.getPluginManager().callEvent(ede);
user.damage(Short.MAX_VALUE);
+ if (user.getHealth() > 0)
+ {
+ user.setHealth(0);
+ }
user.sendMessage(_("suicideMessage"));
user.setDisplayNick();
- ess.broadcastMessage(user,_("suicideSuccess", user.getDisplayName()));
+ ess.broadcastMessage(user, _("suicideSuccess", user.getDisplayName()));
}
}