Fixed setzonelobby not working for detaching lobbies: copy-pasta = bad. Hooked up warhub command.

This commit is contained in:
taoneill 2011-08-06 17:00:51 -04:00
parent 05b827d265
commit 6dfb485ec2
4 changed files with 6 additions and 15 deletions

View File

@ -1,10 +0,0 @@
package bukkit.tommytony.war;
public class NoZoneMakerException extends Exception {
/**
*
*/
private static final long serialVersionUID = -5412011034665080340L;
}

View File

@ -48,7 +48,9 @@ public class WarCommandHandler {
AbstractWarCommand commandObj = null;
try {
if (command.equals("zones") || command.equals("warzones")) {
if (command.equals("warhub")) {
commandObj = new WarhubCommand(this, sender, arguments);
} else if (command.equals("zones") || command.equals("warzones")) {
commandObj = new WarzonesCommand(this, sender, arguments);
} else if (command.equals("zone") || command.equals("warzone")) {
commandObj = new WarzoneCommand(this, sender, arguments);

View File

@ -30,10 +30,9 @@ public class SetZoneLobbyCommand extends AbstractZoneMakerCommand {
Warzone zone = Warzone.getZoneByLocation((Player) this.getSender());
if (zone == null) {
ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
if (lobby == null) {
return false;
if (lobby != null) {
zone = lobby.getZone();
}
zone = lobby.getZone();
}
if (zone == null) {

View File

@ -35,7 +35,7 @@ public class WarzonesCommand extends AbstractWarCommand {
for (Team team : warzone.getTeams()) {
playerTotal += team.getPlayers().size();
}
warzonesMessage += playerTotal + " players)";
warzonesMessage += playerTotal + " players) ";
}
}