border info message now shows if border is enabled or disabled
This commit is contained in:
parent
785dc10644
commit
46d19fa35e
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user