From fa3e0d61865787ed9bac3071b41c516fd1ed8cd8 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Sun, 18 Sep 2011 09:48:23 -0600 Subject: [PATCH] Check for console, Closes #118 --- .../MultiverseCore/commands/TeleportCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java index fd761b7d..8a1e9d6f 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java +++ b/src/main/java/com/onarandombox/MultiverseCore/commands/TeleportCommand.java @@ -137,7 +137,10 @@ public class TeleportCommand extends MultiverseCommand { } private boolean checkSendPermissions(CommandSender teleporter, Player teleportee, MVDestination destination) { - if(teleporter.equals(teleportee)) { + if (teleporter == null) { + return true; + } + if (teleporter.equals(teleportee)) { if(!this.plugin.getPermissions().hasPermission(teleporter, "multiverse.teleport.self."+destination.getIdentifier(),true)) { teleporter.sendMessage("You don't have permission to teleport yourself to a " + ChatColor.GREEN + destination.getType() + " Destination."); teleporter.sendMessage(ChatColor.RED + " (multiverse.teleport.self."+destination.getIdentifier()+")");