类 HandySchedulerUtil

java.lang.Object
cn.handyplus.lib.adapter.HandySchedulerUtil

public class HandySchedulerUtil extends Object
HandyLib调度器
从以下版本开始:
1.0.0
作者:
handy
  • 字段详细资料

    • 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

      public static void performCommand(org.bukkit.entity.Player player, String command)
      玩家执行命令
      参数:
      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

      public static void runTask(Runnable task)
      同步
      参数:
      task - 方法
    • runTaskLater

      public static void runTaskLater(Runnable task, long delay)
      延迟同步
      参数:
      task - 方法
      delay - 延迟
    • runTaskTimer

      public static void runTaskTimer(Runnable task, long delay, long period)
      循环同步
      参数:
      task - 方法
      delay - 延迟
      period - 期间
    • runTaskTimer

      public static void runTaskTimer(HandyRunnable task, long delay, long period)
      循环同步
      参数:
      task - 方法
      delay - 延迟
      period - 期间
    • runTaskAsynchronously

      public static void runTaskAsynchronously(Runnable task)
      异步
      参数:
      task - 方法
    • runTaskLaterAsynchronously

      public static void runTaskLaterAsynchronously(Runnable task, long delay)
      延迟异步
      参数:
      task - 方法
      delay - 延迟
    • runTaskTimerAsynchronously

      public static void runTaskTimerAsynchronously(Runnable task, long delay, long period)
      循环异步
      参数:
      task - 方法
      delay - 延迟
      period - 期间
    • runTaskTimerAsynchronously

      public static void runTaskTimerAsynchronously(HandyRunnable task, long delay, long period)
      循环异步
      参数:
      task - 方法
      delay - 延迟
      period - 期间
    • cancelTask

      public static void cancelTask()
      取消所有调度任务
    • isFolia

      public static boolean isFolia()
      是否Folia
      返回:
      true是