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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user