类 HandySchedulerUtil
java.lang.Object
cn.handyplus.lib.adapter.HandySchedulerUtil
HandyLib调度器
- 从以下版本开始:
- 1.0.0
- 作者:
- handy
-
字段概要
字段 -
方法概要
修饰符和类型方法说明static voidaddPotionEffects(org.bukkit.entity.Player player, List<org.bukkit.potion.PotionEffect> potionEffectList) 玩家添加药水效果static void取消所有调度任务static voidinit(org.bukkit.plugin.Plugin plugin) 初始化方法static booleanisFolia()是否Foliastatic voidperformCommand(org.bukkit.entity.Player player, String command) 玩家执行命令static voidremovePotionEffect(org.bukkit.entity.Player player, org.bukkit.potion.PotionEffectType potionEffect) 玩家移除药水效果static void同步static void异步static voidrunTaskLater(Runnable task, long delay) 延迟同步static voidrunTaskLaterAsynchronously(Runnable task, long delay) 延迟异步static voidrunTaskTimer(HandyRunnable task, long delay, long period) 循环同步static voidrunTaskTimer(Runnable task, long delay, long period) 循环同步static voidrunTaskTimerAsynchronously(HandyRunnable task, long delay, long period) 循环异步static voidrunTaskTimerAsynchronously(Runnable task, long delay, long period) 循环异步static voidsyncTeleport(org.bukkit.entity.Entity entity, org.bukkit.Location target) 传送实体static voidsyncTeleport(org.bukkit.entity.Entity entity, org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) 传送实体static booleanteleport(org.bukkit.entity.Entity entity, org.bukkit.Location target) 传送实体static booleanteleport(org.bukkit.entity.Entity entity, org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) 传送实体
-
字段详细资料
-
BUKKIT_PLUGIN
protected static org.bukkit.plugin.Plugin BUKKIT_PLUGIN插件
-
-
方法详细资料
-
init
public static void init(org.bukkit.plugin.Plugin plugin) 初始化方法- 参数:
plugin- 插件
-
teleport
public static boolean teleport(org.bukkit.entity.Entity entity, org.bukkit.Location target) 传送实体- 参数:
entity- 需要传送的实体target- 目的地- 返回:
- 传送结果
-
teleport
public static boolean teleport(org.bukkit.entity.Entity entity, org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) 传送实体- 参数:
entity- 需要传送的实体target- 传送目的地cause- 传送原因- 返回:
- 传送结果
-
syncTeleport
public static void syncTeleport(org.bukkit.entity.Entity entity, org.bukkit.Location target) 传送实体- 参数:
entity- 需要传送的实体target- 传送目的地- 从以下版本开始:
- 1.0.2
-
syncTeleport
public static void syncTeleport(org.bukkit.entity.Entity entity, org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) 传送实体- 参数:
entity- 需要传送的实体target- 传送目的地cause- 传送原因- 从以下版本开始:
- 1.0.2
-
performCommand
玩家执行命令- 参数:
player- 玩家command- 命令
-
addPotionEffects
public static void addPotionEffects(org.bukkit.entity.Player player, List<org.bukkit.potion.PotionEffect> potionEffectList) 玩家添加药水效果- 参数:
player- 玩家potionEffectList- 药水效果
-
removePotionEffect
public static void removePotionEffect(org.bukkit.entity.Player player, org.bukkit.potion.PotionEffectType potionEffect) 玩家移除药水效果- 参数:
player- 玩家potionEffect- 药水效果
-
runTask
同步- 参数:
task- 方法
-
runTaskLater
延迟同步- 参数:
task- 方法delay- 延迟
-
runTaskTimer
循环同步- 参数:
task- 方法delay- 延迟period- 期间
-
runTaskTimer
循环同步- 参数:
task- 方法delay- 延迟period- 期间
-
runTaskAsynchronously
异步- 参数:
task- 方法
-
runTaskLaterAsynchronously
延迟异步- 参数:
task- 方法delay- 延迟
-
runTaskTimerAsynchronously
循环异步- 参数:
task- 方法delay- 延迟period- 期间
-
runTaskTimerAsynchronously
循环异步- 参数:
task- 方法delay- 延迟period- 期间
-
cancelTask
public static void cancelTask()取消所有调度任务 -
isFolia
public static boolean isFolia()是否Folia- 返回:
- true是
-