Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
785dc10644 | |||
c671f04f65 |
Binary file not shown.
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
<groupId>de.craftinc</groupId>
|
<groupId>de.craftinc</groupId>
|
||||||
<artifactId>CraftincBorderProtection</artifactId>
|
<artifactId>CraftincBorderProtection</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.0.3</version>
|
<version>1.0.3-1</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
@ -127,15 +127,24 @@ public class Commands implements CommandExecutor
|
|||||||
// on
|
// on
|
||||||
if ( args.length == 1 && ( args[0].equalsIgnoreCase("on") || args[0].equalsIgnoreCase("off") ) )
|
if ( args.length == 1 && ( args[0].equalsIgnoreCase("on") || args[0].equalsIgnoreCase("off") ) )
|
||||||
{
|
{
|
||||||
|
if ( !sender.hasPermission("craftinc.borderprotection.set") )
|
||||||
|
{
|
||||||
|
sender.sendMessage(Messages.noPermissionSet);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
World world = ( (Player) sender ).getWorld();
|
World world = ( (Player) sender ).getWorld();
|
||||||
Border border = Border.getBorders().get(world);
|
Border border = Border.getBorders().get(world);
|
||||||
|
|
||||||
if (border != null)
|
if ( border != null )
|
||||||
|
{
|
||||||
|
if ( args[0].equalsIgnoreCase("on") )
|
||||||
{
|
{
|
||||||
if (args[0].equalsIgnoreCase("on")) {
|
|
||||||
border.enable();
|
border.enable();
|
||||||
sender.sendMessage(Messages.borderEnabled);
|
sender.sendMessage(Messages.borderEnabled);
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
border.disable();
|
border.disable();
|
||||||
sender.sendMessage(Messages.borderDisabled);
|
sender.sendMessage(Messages.borderDisabled);
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ public class Messages
|
|||||||
ChatColor.YELLOW + "No border in this world.";
|
ChatColor.YELLOW + "No border in this world.";
|
||||||
|
|
||||||
public static String noPermissionSet =
|
public static String noPermissionSet =
|
||||||
ChatColor.RED + "Sorry, you don't have permission to set the border.";
|
ChatColor.RED + "Sorry, you don't have permission to change the border.";
|
||||||
|
|
||||||
public static String borderEnabled =
|
public static String borderEnabled =
|
||||||
ChatColor.YELLOW + "Border enabled.";
|
ChatColor.YELLOW + "Border enabled.";
|
||||||
|
Reference in New Issue
Block a user