diff --git a/dist/DiscoSheep.jar b/dist/DiscoSheep.jar index 6dc814f..b3c2921 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 470c2e6..1281657 100644 --- a/src/gibstick/bukkit/discosheep/DiscoParty.java +++ b/src/gibstick/bukkit/discosheep/DiscoParty.java @@ -312,6 +312,12 @@ public class DiscoParty { this.scheduleUpdate(); ds.getPartyMap().put(this.player.getName(), this); } + + void startDisco() { + this.spawnSheep(sheep, radius); + this.scheduleUpdate(); + ds.getPartyMap().put(this.player.getName(), this); + } void stopDisco() { removeAllSheep(); diff --git a/src/gibstick/bukkit/discosheep/DiscoSheep.java b/src/gibstick/bukkit/discosheep/DiscoSheep.java index 7ea8381..151e081 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheep.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheep.java @@ -110,7 +110,13 @@ public final class DiscoSheep extends JavaPlugin { public void startParty(Player player, int duration, int sheepAmount, int radius, int period, boolean fireworksEnabled) { if (!hasParty(player.getName())) { - new DiscoParty(this, player).startDisco(duration, sheepAmount, radius, period, fireworksEnabled); + DiscoParty ds = new DiscoParty(this, player); + ds.setDuration(duration); + ds.setSheep(sheepAmount); + ds.setRadius(radius); + ds.setPeriod(period); + ds.setDoFireworks(fireworksEnabled); + ds.startDisco(); } } } diff --git a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java index 61894dc..a233612 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java @@ -15,6 +15,7 @@ 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"; @@ -205,7 +206,7 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { if (args.length > 0) { if (args[0].equalsIgnoreCase("all")) { - return partyAllCommand(player, duration, sheepNumber, radius, period, fireworks); + return partyAllCommand(sender, duration, sheepNumber, radius, period, fireworks); } else if (args[0].equalsIgnoreCase("stopall")) { return stopAllCommand(sender); } else if (args[0].equalsIgnoreCase("stop") && isPlayer) { @@ -219,7 +220,7 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { } else if (args[0].equalsIgnoreCase("reload")) { return reloadCommand(sender); } else { - sender.sendMessage(ChatColor.RED + "Invalid argument."); + sender.sendMessage(ChatColor.RED + "Invalid argument (certain commands do not work from console)."); return false; }