Clear player potion effects on class reset
Ensure active potion effects are removed when resetting a player's class. This prevents lingering effects from other classes, maintaining consistent game behavior.
This commit is contained in:
parent
55b88a950d
commit
4f8a7a0416
|
|
@ -86,6 +86,7 @@ public abstract class GameClass {
|
|||
player.setHealth(health);
|
||||
//Always reset the player inventory since other classes might have had them get items
|
||||
player.getInventory().clear();
|
||||
player.clearActivePotionEffects();
|
||||
|
||||
player.getInventory().setContents(tools.toArray(ItemStack[]::new));
|
||||
TeamColor color = teamPlayer.getTeam().getColor();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user