* Fixed bug potion effects are not getting removed after join. Fixes #27.
This commit is contained in:
parent
3ab1733d1a
commit
8fa0e35723
@ -18,6 +18,7 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class ArenaHandler {
|
||||
@ -128,7 +129,10 @@ public class ArenaHandler {
|
||||
|
||||
player.teleport(arena.lobbyWarp);
|
||||
player.setGameMode(GameMode.SURVIVAL);
|
||||
player.getActivePotionEffects().clear();
|
||||
for (PotionEffect pe : player
|
||||
.getActivePotionEffects()) {
|
||||
player.removePotionEffect(pe.getType());
|
||||
}
|
||||
player.setFoodLevel(20);
|
||||
player.setHealth(20);
|
||||
player.setLevel(arena.timer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user