Fixed space command sender name

This commit is contained in:
LemADEC 2015-08-29 19:43:19 +02:00
parent 66d5b6e49b
commit eb7a83223a

View file

@ -26,6 +26,7 @@ public class CommandSpace extends CommandBase {
@Override @Override
public void processCommand(ICommandSender sender, String[] args) { public void processCommand(ICommandSender sender, String[] args) {
if (sender == null) { return; }
MinecraftServer server = MinecraftServer.getServer(); MinecraftServer server = MinecraftServer.getServer();
// set defaults // set defaults
@ -88,7 +89,7 @@ public class CommandSpace extends CommandBase {
WarpDrive.addChatMessage(sender, message); WarpDrive.addChatMessage(sender, message);
WarpDrive.logger.info(message); WarpDrive.logger.info(message);
if (sender != player) { 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 // find a good spot