Check for console, Closes #118

This commit is contained in:
Eric Stokes 2011-09-18 09:48:23 -06:00
parent 20ce518d33
commit fa3e0d6186

View File

@ -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()+")");