From 8d5a8667de3bd67e4230eeff2ed4d22c87350b3e Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Wed, 21 Sep 2011 18:02:59 -0400 Subject: [PATCH] Made death message handling check for 'null' to disable death messages, along with an empty string. --- src/main/java/net/minecraft/server/EntityPlayer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 3c944a9baa..6525269d4f 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())); }