mirror of
https://github.com/taoneill/war.git
synced 2024-11-27 12:46:11 +01:00
Merge remote branch 'Evil-Code/resetInventoryOnZoneDelete' into tim
This commit is contained in:
commit
f211d43689
@ -577,14 +577,21 @@ public class War extends JavaPlugin {
|
|||||||
warzone = this.warzone(player.getLocation());
|
warzone = this.warzone(player.getLocation());
|
||||||
lobby = this.lobby(player.getLocation());
|
lobby = this.lobby(player.getLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(warzone == null && lobby != null) {
|
if(warzone == null && lobby != null) {
|
||||||
warzone = lobby.getZone();
|
warzone = lobby.getZone();
|
||||||
} else {
|
} else {
|
||||||
lobby = warzone.getLobby();
|
lobby = warzone.getLobby();
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Team t : warzone.getTeams()) {
|
for(Team t : warzone.getTeams()) {
|
||||||
if(t.getTeamFlag() != null) t.getFlagVolume().resetBlocks();
|
if(t.getTeamFlag() != null) t.getFlagVolume().resetBlocks();
|
||||||
t.getSpawnVolume().resetBlocks();
|
t.getSpawnVolume().resetBlocks();
|
||||||
|
|
||||||
|
// reset inventory
|
||||||
|
for(Player p : t.getPlayers()) {
|
||||||
|
warzone.restorePlayerInventory(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for(Monument m : warzone.getMonuments()) {
|
for(Monument m : warzone.getMonuments()) {
|
||||||
m.getVolume().resetBlocks();
|
m.getVolume().resetBlocks();
|
||||||
|
Loading…
Reference in New Issue
Block a user