package cn.citycraft.AuthMe.cache.limbo;

import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.scheduler.BukkitTask;

public class LimboPlayer {

	private boolean flying = false;
	private GameMode gameMode = GameMode.SURVIVAL;
	private String group = "";
	private Location loc = null;
	private BukkitTask messageTaskId = null;
	private String name;
	private boolean operator = false;
	private BukkitTask timeoutTaskId = null;

	public LimboPlayer(String name, Location loc, GameMode gameMode, boolean operator, String group, boolean flying) {
		this.name = name;
		this.loc = loc;
		this.gameMode = gameMode;
		this.operator = operator;
		this.group = group;
		this.flying = flying;
	}

	public LimboPlayer(String name, String group) {
		this.name = name;
		this.group = group;
	}

	public GameMode getGameMode() {
		return gameMode;
	}

	public String getGroup() {
		return group;
	}

	public Location getLoc() {
		return loc;
	}

	public BukkitTask getMessageTaskId() {
		return messageTaskId;
	}

	public String getName() {
		return name;
	}

	public boolean getOperator() {
		return operator;
	}

	public BukkitTask getTimeoutTaskId() {
		return timeoutTaskId;
	}

	public boolean isFlying() {
		return flying;
	}

	public void setMessageTaskId(BukkitTask messageTaskId) {
		if (this.messageTaskId != null)
			this.messageTaskId.cancel();
		this.messageTaskId = messageTaskId;
	}

	public void setTimeoutTaskId(BukkitTask i) {
		if (this.timeoutTaskId != null)
			this.timeoutTaskId.cancel();
		this.timeoutTaskId = i;
	}
}
