SteamWar/MissileWars
Archiviert
13
0

Merge pull request 'Add distribute items on team leave' (#34) from Fix_Player_Team_Leave into master

Reviewed-on: #34
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
YoyoNow 2021-04-04 17:17:47 +02:00
Commit d867432a33

Datei anzeigen

@ -130,6 +130,15 @@ public class MWTeam {
if (!players.contains(p)) return; if (!players.contains(p)) return;
players.remove(p); players.remove(p);
for (ItemStack stack : p.getInventory().getContents()) {
if (stack == null) continue;
if (stack.getType() == Material.AIR) continue;
if (stack.isSimilar(bow)) continue;
givePlayerItem(stack);
}
p.getInventory().clear();
p.setDisplayName("§7" + p.getName()); p.setDisplayName("§7" + p.getName());
sbteam.removePlayer(p); sbteam.removePlayer(p);
if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING) if (players.isEmpty() && MissileWars.getFightState() == FightState.FIGHTING)