mirror of
https://github.com/taoneill/war.git
synced 2025-01-20 22:31:20 +01:00
Reset the inventory on zone delete
This commit is contained in:
parent
84452d6654
commit
cbf11a704e
@ -588,14 +588,21 @@ public class War extends JavaPlugin {
|
||||
warzone = this.warzone(player.getLocation());
|
||||
lobby = this.lobby(player.getLocation());
|
||||
}
|
||||
|
||||
if(warzone == null && lobby != null) {
|
||||
warzone = lobby.getZone();
|
||||
} else {
|
||||
lobby = warzone.getLobby();
|
||||
}
|
||||
|
||||
for(Team t : warzone.getTeams()) {
|
||||
if(t.getTeamFlag() != null) t.getFlagVolume().resetBlocks();
|
||||
t.getSpawnVolume().resetBlocks();
|
||||
|
||||
// reset inventory
|
||||
for(Player p : t.getPlayers()) {
|
||||
warzone.restorePlayerInventory(p);
|
||||
}
|
||||
}
|
||||
for(Monument m : warzone.getMonuments()) {
|
||||
m.getVolume().resetBlocks();
|
||||
|
Loading…
Reference in New Issue
Block a user