Package fr.fuzeblocks.homeplugin.task
Class TaskManager
java.lang.Object
org.bukkit.scheduler.BukkitRunnable
fr.fuzeblocks.homeplugin.task.TaskManager
- All Implemented Interfaces:
Runnable
public class TaskManager
extends org.bukkit.scheduler.BukkitRunnable
The type Task manager.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCancel teleport task.org.bukkit.LocationGets home location.Gets home name.org.bukkit.entity.PlayerGets player.getTask()Gets task.voidConfigure home task.voidrun()voidspawnTask(org.bukkit.entity.Player player) Configure spawn task.voidStart teleport task.Methods inherited from class org.bukkit.scheduler.BukkitRunnable
cancel, getTaskId, isCancelled, runTask, runTaskAsynchronously, runTaskLater, runTaskLaterAsynchronously, runTaskTimer, runTaskTimerAsynchronously
-
Constructor Details
-
TaskManager
public TaskManager()
-
-
Method Details
-
run
public void run() -
startTeleportTask
public void startTeleportTask()Start teleport task. -
cancelTeleportTask
Cancel teleport task.- Throws:
TeleportTaskException- if task cannot be cancelled
-
homeTask
public void homeTask(String homeName, org.bukkit.entity.Player player, org.bukkit.Location location) Configure home task.- Parameters:
homeName- the home nameplayer- the playerlocation- the location
-
spawnTask
public void spawnTask(org.bukkit.entity.Player player) Configure spawn task.- Parameters:
player- the player
-
getPlayer
public org.bukkit.entity.Player getPlayer()Gets player.- Returns:
- the player
-
getTask
Gets task.- Returns:
- the task
-
getHomeName
Gets home name.- Returns:
- the home name
-
getHomeLocation
public org.bukkit.Location getHomeLocation()Gets home location.- Returns:
- the home location
-