Made command return false if unsuccessful.

This commit is contained in:
Tastybento 2018-02-06 21:40:29 -08:00
parent 81b0543f25
commit f4c7a3fe45

View File

@ -34,7 +34,7 @@ public class AdminTeleportCommand extends CompositeCommand {
final UUID targetUUID = getPlayers().getUUID(args.get(0));
if (targetUUID == null) {
user.sendMessage("errors.unknown-player");
return true;
return false;
} else {
if (getPlayers().hasIsland(targetUUID) || getPlayers().inTeam(targetUUID)) {
Location warpSpot = getIslands().getIslandLocation(targetUUID).toVector().toLocation(getPlugin().getIslandWorldManager().getIslandWorld());
@ -50,7 +50,7 @@ public class AdminTeleportCommand extends CompositeCommand {
return true;
}
user.sendMessage("command.admin.tp.no-island");
return true;
return false;
}
}