2015-11-28 10:03:58 +01:00
|
|
|
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()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-11-29 03:10:39 +01:00
|
|
|
public boolean checkForDeath()
|
|
|
|
{
|
|
|
|
return _dead || _player == null;
|
|
|
|
}
|
|
|
|
|
2015-11-28 10:03:58 +01:00
|
|
|
public void finish()
|
|
|
|
{
|
|
|
|
onFinish();
|
|
|
|
_task.finishFor(_player);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void kill()
|
|
|
|
{
|
|
|
|
_dead = true;
|
|
|
|
_player = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onFinish() {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|