diff --git a/CraftincBorderProtection.jar b/CraftincBorderProtection.jar index 18c6e5f..39ffcd5 100644 Binary files a/CraftincBorderProtection.jar and b/CraftincBorderProtection.jar differ diff --git a/pom.xml b/pom.xml index 48f26e1..0cb7e70 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ de.craftinc CraftincBorderProtection jar - 1.0.2 + 1.0.3 UTF-8 diff --git a/src/main/java/de/craftinc/borderprotection/Border.java b/src/main/java/de/craftinc/borderprotection/Border.java index 58503a1..47f5485 100644 --- a/src/main/java/de/craftinc/borderprotection/Border.java +++ b/src/main/java/de/craftinc/borderprotection/Border.java @@ -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; } diff --git a/src/main/java/de/craftinc/borderprotection/Commands.java b/src/main/java/de/craftinc/borderprotection/Commands.java index 00bd629..2db04c2 100644 --- a/src/main/java/de/craftinc/borderprotection/Commands.java +++ b/src/main/java/de/craftinc/borderprotection/Commands.java @@ -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 diff --git a/src/main/java/de/craftinc/borderprotection/Messages.java b/src/main/java/de/craftinc/borderprotection/Messages.java index 84c7cd3..f63a069 100644 --- a/src/main/java/de/craftinc/borderprotection/Messages.java +++ b/src/main/java/de/craftinc/borderprotection/Messages.java @@ -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."; diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f2401a6..6adfe4f 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -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