diff --git a/src/main/java/de/craftinc/borderprotection/Commands.java b/src/main/java/de/craftinc/borderprotection/Commands.java index 7ef00dd..ac4e7cf 100644 --- a/src/main/java/de/craftinc/borderprotection/Commands.java +++ b/src/main/java/de/craftinc/borderprotection/Commands.java @@ -71,7 +71,7 @@ public class Commands implements CommandExecutor borderManager.setBorder(( (Player) sender ).getWorld(), Double.parseDouble(args[1])); Border border = Border.getBorders().get(world); sender.sendMessage(Messages.borderCreationSuccessful); - sender.sendMessage(Messages.borderInfo(world.getName(), border.toString())); + sender.sendMessage(Messages.borderInfo(world.getName(), border.toString(), border.isActive())); } catch ( Exception e ) { @@ -86,7 +86,7 @@ public class Commands implements CommandExecutor borderManager.setBorder(( (Player) sender ).getWorld(), args[1], args[2]); Border border = Border.getBorders().get(world); sender.sendMessage(Messages.borderCreationSuccessful); - sender.sendMessage(Messages.borderInfo(world.getName(), border.toString())); + sender.sendMessage(Messages.borderInfo(world.getName(), border.toString(), border.isActive())); } catch ( Exception e ) { @@ -120,7 +120,7 @@ public class Commands implements CommandExecutor Border border = Border.getBorders().get(world); - sender.sendMessage(Messages.borderInfo(world.getName(), border.toString())); + sender.sendMessage(Messages.borderInfo(world.getName(), border.toString(), border.isActive())); return true; } diff --git a/src/main/java/de/craftinc/borderprotection/Messages.java b/src/main/java/de/craftinc/borderprotection/Messages.java index 94b37a8..1bc7bc9 100644 --- a/src/main/java/de/craftinc/borderprotection/Messages.java +++ b/src/main/java/de/craftinc/borderprotection/Messages.java @@ -82,13 +82,21 @@ public class Messages public static String commandIssuedByNonPlayer = ChatColor.RED + "Only a player can use CraftInc BorderProtection commands!"; - public static String borderInfo( String worldName, String borderDef ) + public static String borderInfo( String worldName, String borderDef, Boolean isBorderEnabled ) { + String borderEnabled; + if (isBorderEnabled) + { + borderEnabled = ChatColor.GREEN + "enabled"; + } else { + borderEnabled = ChatColor.RED + "disabled"; + } return ChatColor.WHITE + "Borders of world " + ChatColor.YELLOW + worldName + ChatColor.WHITE + ": " + - ChatColor.YELLOW + borderDef; + ChatColor.YELLOW + borderDef + ChatColor.WHITE + "." + NEWLINE + + ChatColor.WHITE + "Border is " + borderEnabled + ChatColor.WHITE + "."; } public static String borderInfoNoBorderSet =