diff options
author | EvilSeph <evilseph@gmail.com> | 2011-09-21 18:02:59 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2011-09-21 18:02:59 -0400 |
commit | 8d5a8667de3bd67e4230eeff2ed4d22c87350b3e (patch) | |
tree | 0123a4376c4272e36d191e4867302d71c130b52e /src/main/java/net | |
parent | 217b4141186b7034f7c14335a20e0b9934a35121 (diff) | |
download | craftbukkit-8d5a8667de3bd67e4230eeff2ed4d22c87350b3e.tar craftbukkit-8d5a8667de3bd67e4230eeff2ed4d22c87350b3e.tar.gz craftbukkit-8d5a8667de3bd67e4230eeff2ed4d22c87350b3e.tar.lz craftbukkit-8d5a8667de3bd67e4230eeff2ed4d22c87350b3e.tar.xz craftbukkit-8d5a8667de3bd67e4230eeff2ed4d22c87350b3e.zip |
Made death message handling check for 'null' to disable death messages, along with an empty string.
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityPlayer.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 3c944a9b..6525269d 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -156,7 +156,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, damagesource.a(this)); - if (!"".equals(event.getDeathMessage())) { + + String deathMessage = event.getDeathMessage(); + + if (deathMessage != null && deathMessage.length() > 0) { this.b.serverConfigurationManager.sendAll(new Packet3Chat(event.getDeathMessage())); } |