version 1.0.3
softdepend Multiverse-Core added (should resolve issue #7) removed a system.out.println fixed: now checks if border is null before trying to on|off
This commit is contained in:
parent
5bc660d392
commit
0176ec3a3a
Binary file not shown.
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<groupId>de.craftinc</groupId>
|
||||
<artifactId>CraftincBorderProtection</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
|
||||
<properties>
|
||||
<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(isActiveKey, isActive);
|
||||
|
||||
System.out.println(map);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -128,12 +128,21 @@ public class Commands implements CommandExecutor
|
||||
if ( args.length == 1 && ( args[0].equalsIgnoreCase("on") || args[0].equalsIgnoreCase("off") ) )
|
||||
{
|
||||
World world = ( (Player) sender ).getWorld();
|
||||
if (args[0].equalsIgnoreCase("on")) {
|
||||
Border.getBorders().get(world).enable();
|
||||
sender.sendMessage(Messages.borderEnabled);
|
||||
} else {
|
||||
Border.getBorders().get(world).disable();
|
||||
sender.sendMessage(Messages.borderDisabled);
|
||||
Border border = Border.getBorders().get(world);
|
||||
|
||||
if (border != null)
|
||||
{
|
||||
if (args[0].equalsIgnoreCase("on")) {
|
||||
border.enable();
|
||||
sender.sendMessage(Messages.borderEnabled);
|
||||
} else {
|
||||
border.disable();
|
||||
sender.sendMessage(Messages.borderDisabled);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.sendMessage(Messages.borderInfoNoBorderSet);
|
||||
}
|
||||
|
||||
// save the new border
|
||||
|
@ -92,7 +92,7 @@ public class Messages
|
||||
}
|
||||
|
||||
public static String borderInfoNoBorderSet =
|
||||
ChatColor.YELLOW + "No border here.";
|
||||
ChatColor.YELLOW + "No border in this world.";
|
||||
|
||||
public static String noPermissionSet =
|
||||
ChatColor.RED + "Sorry, you don't have permission to set the border.";
|
||||
|
@ -17,6 +17,7 @@
|
||||
name: Craft Inc. BorderProtection
|
||||
main: de.craftinc.borderprotection.Plugin
|
||||
version: ${project.version}
|
||||
softdepend: [Multiverse-Core]
|
||||
authors: [ddidderr, mice_on_drugs]
|
||||
website: http://www.craftinc.de/plugins/borderprotection
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user