aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/Resurrection/player/ResurrectPlayer.java
blob: 971ada356e2ba445b5e8492f6b8e2b135d17e298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package net.brysonsteck.Resurrection.player;

import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;

public class ResurrectPlayer {

    public ResurrectPlayer(Player p) {
        for (PotionEffect effect : p.getActivePotionEffects())
            p.removePotionEffect(effect.getType());
        p.setGameMode(GameMode.SURVIVAL);
        Bukkit.broadcastMessage(p.getDisplayName() + " has resurrected!");
    }
}