Mineplex2018-withcommit/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorials/DeployedTask.java
2015-11-29 02:10:39 +00:00

47 lines
658 B
Java

package mineplex.game.clans.tutorials;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
public class DeployedTask implements Listener
{
protected Player _player;
protected boolean _finished;
protected TutorialTask<?> _task;
protected boolean _dead;
public DeployedTask(Player player, TutorialTask<?> task)
{
_player = player;
_task = task;
}
public void postDeploy()
{
}
public boolean checkForDeath()
{
return _dead || _player == null;
}
public void finish()
{
onFinish();
_task.finishFor(_player);
}
public void kill()
{
_dead = true;
_player = null;
}
public void onFinish() {
}
}