Fixed a silly bug and also added an additional check

This commit is contained in:
Alexander
2020-02-16 05:47:26 +00:00
parent 168eb6c83f
commit bb12f3c419

View File

@@ -65,7 +65,12 @@ public class SetDestinationCommand implements CommandExecutor {
return true;
}
String destination = String.join(", ", destinations);
String destination = String.join(" ", destinations);
if (destination.length() > 40) {
player.sendMessage(ChatColor.RED + "Destinations as a whole cannot have more than 40 characters.");
return true;
}
long start = System.currentTimeMillis();
plugin.getDatabase().setPlayerDestination(player, destination);