mirror of
https://github.com/taoneill/war.git
synced 2024-11-14 14:25:27 +01:00
Fixed setzonelobby not working for detaching lobbies: copy-pasta = bad. Hooked up warhub command.
This commit is contained in:
parent
05b827d265
commit
6dfb485ec2
@ -1,10 +0,0 @@
|
|||||||
package bukkit.tommytony.war;
|
|
||||||
|
|
||||||
public class NoZoneMakerException extends Exception {
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private static final long serialVersionUID = -5412011034665080340L;
|
|
||||||
|
|
||||||
}
|
|
@ -48,7 +48,9 @@ public class WarCommandHandler {
|
|||||||
|
|
||||||
AbstractWarCommand commandObj = null;
|
AbstractWarCommand commandObj = null;
|
||||||
try {
|
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);
|
commandObj = new WarzonesCommand(this, sender, arguments);
|
||||||
} else if (command.equals("zone") || command.equals("warzone")) {
|
} else if (command.equals("zone") || command.equals("warzone")) {
|
||||||
commandObj = new WarzoneCommand(this, sender, arguments);
|
commandObj = new WarzoneCommand(this, sender, arguments);
|
||||||
|
@ -30,10 +30,9 @@ public class SetZoneLobbyCommand extends AbstractZoneMakerCommand {
|
|||||||
Warzone zone = Warzone.getZoneByLocation((Player) this.getSender());
|
Warzone zone = Warzone.getZoneByLocation((Player) this.getSender());
|
||||||
if (zone == null) {
|
if (zone == null) {
|
||||||
ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
|
ZoneLobby lobby = ZoneLobby.getLobbyByLocation((Player) this.getSender());
|
||||||
if (lobby == null) {
|
if (lobby != null) {
|
||||||
return false;
|
zone = lobby.getZone();
|
||||||
}
|
}
|
||||||
zone = lobby.getZone();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zone == null) {
|
if (zone == null) {
|
||||||
|
@ -35,7 +35,7 @@ public class WarzonesCommand extends AbstractWarCommand {
|
|||||||
for (Team team : warzone.getTeams()) {
|
for (Team team : warzone.getTeams()) {
|
||||||
playerTotal += team.getPlayers().size();
|
playerTotal += team.getPlayers().size();
|
||||||
}
|
}
|
||||||
warzonesMessage += playerTotal + " players)";
|
warzonesMessage += playerTotal + " players) ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user