mirror of
https://github.com/taoneill/war.git
synced 2024-12-02 23:23:30 +01:00
Remove broken getZoneByTeam logic
- Replaced with warzone getter on Team objects - Should close #704
This commit is contained in:
parent
97646becc3
commit
df85b176b7
@ -79,6 +79,10 @@ public class Team {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Warzone getZone() {
|
||||
return this.warzone;
|
||||
}
|
||||
|
||||
public TeamKind getKind() {
|
||||
return this.kind;
|
||||
|
@ -428,7 +428,7 @@ public class War extends JavaPlugin {
|
||||
if (loadout == null) {
|
||||
// Check if any loadouts exist, if not gotta use the default inventories then add the newly created one
|
||||
if(!team.getInventories().hasLoadouts()) {
|
||||
Warzone warzone = Warzone.getZoneByTeam(team);
|
||||
Warzone warzone = team.getZone();
|
||||
for (String key : warzone.getDefaultInventories().resolveLoadouts().keySet()) {
|
||||
HashMap<Integer, ItemStack> transferredLoadout = warzone.getDefaultInventories().resolveLoadouts().get(key);
|
||||
if (transferredLoadout != null) {
|
||||
|
@ -169,18 +169,6 @@ public class Warzone {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Warzone getZoneByTeam(Team team) {
|
||||
for (Warzone warzone : War.war.getWarzones()) {
|
||||
for (Team teamToCheck : warzone.getTeams()) {
|
||||
if (teamToCheck.getName().equals(team.getName())) {
|
||||
return warzone;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean ready() {
|
||||
if (this.volume.hasTwoCorners() && !this.volume.tooSmall() && !this.volume.tooBig()) {
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user