Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
785dc10644 | |||
c671f04f65 | |||
0176ec3a3a |
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.2</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>
|
||||||
|
@ -122,8 +122,6 @@ public class Border implements ConfigurationSerializable
|
|||||||
map.put(rectPoint2Name, LocationSerializer.serializeLocation(rectPoint2));
|
map.put(rectPoint2Name, LocationSerializer.serializeLocation(rectPoint2));
|
||||||
map.put(isActiveKey, isActive);
|
map.put(isActiveKey, isActive);
|
||||||
|
|
||||||
System.out.println(map);
|
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,13 +127,31 @@ 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();
|
||||||
if (args[0].equalsIgnoreCase("on")) {
|
Border border = Border.getBorders().get(world);
|
||||||
Border.getBorders().get(world).enable();
|
|
||||||
sender.sendMessage(Messages.borderEnabled);
|
if ( border != null )
|
||||||
} else {
|
{
|
||||||
Border.getBorders().get(world).disable();
|
if ( args[0].equalsIgnoreCase("on") )
|
||||||
sender.sendMessage(Messages.borderDisabled);
|
{
|
||||||
|
border.enable();
|
||||||
|
sender.sendMessage(Messages.borderEnabled);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
border.disable();
|
||||||
|
sender.sendMessage(Messages.borderDisabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sender.sendMessage(Messages.borderInfoNoBorderSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// save the new border
|
// save the new border
|
||||||
|
@ -92,10 +92,10 @@ public class Messages
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String borderInfoNoBorderSet =
|
public static String borderInfoNoBorderSet =
|
||||||
ChatColor.YELLOW + "No border here.";
|
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.";
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
name: Craft Inc. BorderProtection
|
name: Craft Inc. BorderProtection
|
||||||
main: de.craftinc.borderprotection.Plugin
|
main: de.craftinc.borderprotection.Plugin
|
||||||
version: ${project.version}
|
version: ${project.version}
|
||||||
|
softdepend: [Multiverse-Core]
|
||||||
authors: [ddidderr, mice_on_drugs]
|
authors: [ddidderr, mice_on_drugs]
|
||||||
website: http://www.craftinc.de/plugins/borderprotection
|
website: http://www.craftinc.de/plugins/borderprotection
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user