Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes it Storing and Adding Back Potion Effects #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ private class PlayerInfo {
public final int foodLevel;
public final float saturation;
public final float exhaustion;
public final Collection<PotionEffect> potionEffects;

public PlayerInfo(final BukkitTask removalTask, final BossBarTimer bossBarTask, final Player player) {
this.removalTask = removalTask;
Expand All @@ -134,15 +133,13 @@ public PlayerInfo(final BukkitTask removalTask, final BossBarTimer bossBarTask,
this.foodLevel = player.getFoodLevel();
this.saturation = player.getSaturation();
this.exhaustion = player.getExhaustion();
this.potionEffects = player.getActivePotionEffects();
}

public void applyToPlayer(final Player player) {
player.setFireTicks(fireTicks);
player.setFoodLevel(foodLevel);
player.setExhaustion(exhaustion);
player.setSaturation(saturation);
player.addPotionEffects(potionEffects);
}
}
}