From eb7a83223aecb8bc7218d1cc3f151c89cf9c845f Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sat, 29 Aug 2015 19:43:19 +0200 Subject: [PATCH] Fixed space command sender name --- src/main/java/cr0s/warpdrive/command/CommandSpace.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/command/CommandSpace.java b/src/main/java/cr0s/warpdrive/command/CommandSpace.java index 7fcd12e0..e9416302 100644 --- a/src/main/java/cr0s/warpdrive/command/CommandSpace.java +++ b/src/main/java/cr0s/warpdrive/command/CommandSpace.java @@ -26,6 +26,7 @@ public class CommandSpace extends CommandBase { @Override public void processCommand(ICommandSender sender, String[] args) { + if (sender == null) { return; } MinecraftServer server = MinecraftServer.getServer(); // set defaults @@ -88,7 +89,7 @@ public class CommandSpace extends CommandBase { WarpDrive.addChatMessage(sender, message); WarpDrive.logger.info(message); if (sender != player) { - WarpDrive.addChatMessage(player, sender + " is teleporting you to dimension " + targetDimensionId); // + ":" + targetWorld.getWorldInfo().getWorldName()); + WarpDrive.addChatMessage(player, sender.getCommandSenderName() + " is teleporting you to dimension " + targetDimensionId); // + ":" + targetWorld.getWorldInfo().getWorldName()); } // find a good spot