Grant class potion effects separately to make sure class chests aren't forgotten about.

This is not the proper way to solve this issue, but the refactoring needed to move the responsibility of class chest search somewhere else is a bit too much for a bug hunt.
This commit is contained in:
Andreas Troelsen 2018-07-05 11:19:28 +02:00
parent 335e3e81a6
commit b58964dce9
2 changed files with 4 additions and 1 deletions

View File

@ -165,8 +165,9 @@ public class ArenaClass
if (leggings != null) leggings.giveTo(p);
if (boots != null) boots.giveTo(p);
if (offhand != null) offhand.giveTo(p);
}
// Potion effects
public void grantPotionEffects(Player p) {
effects.forEach(thing -> thing.giveTo(p));
}

View File

@ -1133,6 +1133,7 @@ public class ArenaImpl implements Arena
removePotionEffects(p);
arenaPlayer.setArenaClass(arenaClass);
arenaClass.grantItems(p);
arenaClass.grantPotionEffects(p);
arenaClass.grantLobbyPermissions(p);
autoReady(p);
@ -1207,6 +1208,7 @@ public class ArenaImpl implements Arena
inv.setBoots(boots);
inv.setItemInOffHand(offhand);
arenaClass.grantPotionEffects(p);
arenaClass.grantLobbyPermissions(p);
autoReady(p);