better output on border creation
This commit is contained in:
parent
5463608c3d
commit
e11469618d
@ -61,13 +61,17 @@ public class Commands implements CommandExecutor
|
|||||||
sender.sendMessage(Messages.noPermissionSet);
|
sender.sendMessage(Messages.noPermissionSet);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
World world = ( (Player) sender ).getWorld();
|
||||||
|
|
||||||
// set <distance>
|
// set <distance>
|
||||||
if ( args.length == 2 )
|
if ( args.length == 2 )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
borderManager.setBorder(( (Player) sender ).getWorld(), Double.parseDouble(args[1]));
|
borderManager.setBorder(( (Player) sender ).getWorld(), Double.parseDouble(args[1]));
|
||||||
|
Border border = Border.getBorders().get(world);
|
||||||
sender.sendMessage(Messages.borderCreationSuccessful);
|
sender.sendMessage(Messages.borderCreationSuccessful);
|
||||||
|
sender.sendMessage(Messages.borderInfo(world.getName(), border.toString()));
|
||||||
}
|
}
|
||||||
catch ( Exception e )
|
catch ( Exception e )
|
||||||
{
|
{
|
||||||
@ -80,6 +84,9 @@ public class Commands implements CommandExecutor
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
borderManager.setBorder(( (Player) sender ).getWorld(), args[1], args[2]);
|
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()));
|
||||||
}
|
}
|
||||||
catch ( Exception e )
|
catch ( Exception e )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user