mirror of
https://github.com/taoneill/war.git
synced 2025-01-11 10:18:04 +01:00
Added substing matching for zones.
This commit is contained in:
parent
13955e1ca0
commit
e3f7dd1989
@ -1002,7 +1002,7 @@ public class War extends JavaPlugin {
|
||||
} else {
|
||||
boolean warped = false;
|
||||
for(Warzone warzone : this.getWarzones()) {
|
||||
if(warzone.getName().equals(arguments[0]) && warzone.getTeleport() != null){
|
||||
if(warzone.getName().toLowerCase().startsWith(arguments[0]) && warzone.getTeleport() != null){
|
||||
Team playerTeam = getPlayerTeam(player.getName());
|
||||
if(playerTeam != null) {
|
||||
Warzone playerWarzone = getPlayerTeamWarzone(player.getName());
|
||||
@ -1011,6 +1011,7 @@ public class War extends JavaPlugin {
|
||||
player.teleportTo(warzone.getTeleport());
|
||||
}
|
||||
warped = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!warped) {
|
||||
|
@ -923,6 +923,9 @@ public class Warzone {
|
||||
Team playerTeam = war.getPlayerTeam(player.getName());
|
||||
if(playerTeam !=null) {
|
||||
if(removeFromTeam) playerTeam.removePlayer(player.getName());
|
||||
for(Team t : this.getTeams()) {
|
||||
t.teamcast(player.getName() + " left the zone.");
|
||||
}
|
||||
playerTeam.resetSign();
|
||||
if(this.isFlagThief(player.getName())) {
|
||||
Team victim = this.getVictimTeamForThief(player.getName());
|
||||
|
@ -268,7 +268,7 @@ public class ZoneLobby {
|
||||
for(int doorIndex = 0; doorIndex < warzone.getTeams().size(); doorIndex++) {
|
||||
// 0 at center, 1 to the left, 2 to the right, 3 to the left, etc
|
||||
Team team = warzone.getTeams().get(doorIndex);
|
||||
if(team.getPlayers().size() % 2 == 0) {
|
||||
if(warzone.getTeams().size() % 2 == 0) {
|
||||
// even number of teams
|
||||
if(doorIndex % 2 == 0) {
|
||||
teamGateBlocks.put(team.getName(), new BlockInfo(lobbyMiddleWallBlock.getFace(rightSide, doorIndex * 2 + 2)));
|
||||
|
@ -88,6 +88,7 @@ public class Volume {
|
||||
if(sign.getLines() != null) {
|
||||
this.getSignLines().put("sign-" + i + "-" + j + "-" + k, sign.getLines());
|
||||
}
|
||||
|
||||
} else if(state instanceof Chest) {
|
||||
// Chests
|
||||
Chest chest = (Chest)state;
|
||||
|
Loading…
Reference in New Issue
Block a user