diff --git a/dist/DiscoSheep.jar b/dist/DiscoSheep.jar index dd2047e..7a80a48 100644 Binary files a/dist/DiscoSheep.jar and b/dist/DiscoSheep.jar differ diff --git a/src/gibstick/bukkit/discosheep/DiscoParty.java b/src/gibstick/bukkit/discosheep/DiscoParty.java index 1281657..2d52f43 100644 --- a/src/gibstick/bukkit/discosheep/DiscoParty.java +++ b/src/gibstick/bukkit/discosheep/DiscoParty.java @@ -74,7 +74,7 @@ public class DiscoParty { } public DiscoParty setDuration(int duration) throws IllegalArgumentException { - if (duration < DiscoParty.maxDuration) { + if (duration <= DiscoParty.maxDuration) { this.duration = duration; return this; } else { @@ -92,7 +92,7 @@ public class DiscoParty { } public DiscoParty setRadius(int radius) throws IllegalArgumentException { - if (radius < DiscoParty.maxRadius) { + if (radius <= DiscoParty.maxRadius) { this.radius = radius; return this; } else { @@ -101,7 +101,7 @@ public class DiscoParty { } public DiscoParty setSheep(int sheep) throws IllegalArgumentException { - if (sheep < DiscoParty.maxSheep) { + if (sheep <= DiscoParty.maxSheep) { this.sheep = sheep; return this; } else { diff --git a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java index a233612..52c7f4f 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java @@ -15,7 +15,6 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { public DiscoSheepCommandExecutor(DiscoSheep parent) { this.parent = parent; } - private static final String PERMISSION_PARTY = "discosheep.party"; private static final String PERMISSION_ALL = "discosheep.partyall"; private static final String PERMISSION_FIREWORKS = "discosheep.fireworks"; @@ -42,7 +41,11 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { private int parseNextIntArg(String[] args, int i) { if (i < args.length - 1) { - return Integer.parseInt(args[i + 1]); + try { + return Integer.parseInt(args[i + 1]); + } catch (NumberFormatException e) { + return -1; + } } return -1; }