mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-22 18:46:45 +01:00
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:
parent
335e3e81a6
commit
b58964dce9
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user