only allow one party per player

This commit is contained in:
Charlie Wang 2013-06-30 20:52:49 -04:00
parent 59a1bbbdac
commit f2f429f21d
2 changed files with 19 additions and 17 deletions

View File

@ -51,7 +51,9 @@ public final class DiscoSheep extends JavaPlugin {
} }
} }
public void startDisco(Player player) { public void startParty(Player player) {
if (!hasParty(player.getName())) {
new DiscoParty(this, player).startDisco(); new DiscoParty(this, player).startDisco();
} }
} }
}

View File

@ -16,7 +16,7 @@ public class DiscoSheepCommandExecutor implements CommandExecutor {
@Override @Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (sender instanceof Player) { if (sender instanceof Player) {
parent.startDisco((Player)sender); parent.startParty((Player)sender);
} }
return true; return true;
} }