类 PlayerSchedulerUtil

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

public class PlayerSchedulerUtil extends Object
玩家相关调度器
从以下版本开始:
1.0.4
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
    addPotionEffects(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull List<org.bukkit.potion.PotionEffect> potionEffectList)
    实体添加药水效果 同步
    static void
    addPotionEffects(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull org.bukkit.potion.PotionEffect potionEffect)
    实体添加药水效果 同步
    static void
    closeInventory(@NotNull org.bukkit.entity.Player player)
    玩家关闭gui
    static void
    dispatchCommand(@NotNull String command)
    控制台执行命令
    static void
    dropItem(@NotNull org.bukkit.entity.Player player, @NotNull List<org.bukkit.inventory.ItemStack> dropItemList)
    掉落物品处理
    static void
    openInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory)
    玩家打开gui
    static void
    performCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家执行命令 chat方式
    static void
    performOpCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家已OP身份执行命令 chat方式
    static void
    playerPerformCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家执行命令 performCommand 方式
    static void
    playerPerformOpCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家已OP身份执行命令 performCommand 方式
    static void
    playSound(@NotNull org.bukkit.entity.Player player, @NotNull String sound, float volume, float pitch)
    播放声音 同步
    static void
    playSound(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Sound sound, float volume, float pitch)
    播放声音 同步
    static void
    removePotionEffect(@NotNull org.bukkit.entity.LivingEntity entity, @NotNull org.bukkit.potion.PotionEffectType potionEffect)
    实体添加药水效果 同步
    static void
    syncCloseInventory(@NotNull org.bukkit.entity.Player player)
    玩家关闭gui 使用同步
    static void
    syncDispatchCommand(@NotNull String command)
    控制台执行命令 同步
    static void
    syncOpenInventory(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.inventory.Inventory inventory)
    玩家打开gui 使用同步
    static void
    syncPerformCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家执行命令 chat方式 同步
    static void
    syncPerformOpCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家已OP身份执行命令 chat方式 同步
    static void
    syncPerformReplaceCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家执行替换命令 同步
    static void
    syncPlayerPerformCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家执行命令 performCommand 方式 同步
    static void
    syncPlayerPerformOpCommand(@NotNull org.bukkit.entity.Player player, @NotNull String command)
    玩家已OP身份执行命令 performCommand 方式 同步
    static void
    syncTeleport(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location target)
    传送实体 同步
    static void
    syncTeleport(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause)
    传送实体 同步
    static boolean
    teleport(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location target)
    传送实体
    static boolean
    teleport(@NotNull org.bukkit.entity.Entity entity, @NotNull org.bukkit.Location target, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause)
    传送实体

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 方法详细资料

    • teleport

      public static boolean teleport(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Location target)
      传送实体
      参数:
      entity - 需要传送的实体
      target - 目的地
      返回:
      传送结果
    • teleport

      public static boolean teleport(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Location target, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause)
      传送实体
      参数:
      entity - 需要传送的实体
      target - 传送目的地
      cause - 传送原因
      返回:
      传送结果
    • syncTeleport

      public static void syncTeleport(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Location target)
      传送实体 同步
      参数:
      entity - 需要传送的实体
      target - 传送目的地
    • syncTeleport

      public static void syncTeleport(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull org.bukkit.Location target, @NotNull org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause)
      传送实体 同步
      参数:
      entity - 需要传送的实体
      target - 传送目的地
      cause - 传送原因
    • addPotionEffects

      public static void addPotionEffects(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.potion.PotionEffect potionEffect)
      实体添加药水效果 同步
      参数:
      entity - 实体
      potionEffect - 药水效果
      从以下版本开始:
      1.1.2
    • addPotionEffects

      public static void addPotionEffects(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull List<org.bukkit.potion.PotionEffect> potionEffectList)
      实体添加药水效果 同步
      参数:
      entity - 实体
      potionEffectList - 药水效果
    • removePotionEffect

      public static void removePotionEffect(@NotNull @NotNull org.bukkit.entity.LivingEntity entity, @NotNull @NotNull org.bukkit.potion.PotionEffectType potionEffect)
      实体添加药水效果 同步
      参数:
      entity - 实体
      potionEffect - 药水效果
    • playSound

      public static void playSound(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.Sound sound, float volume, float pitch)
      播放声音 同步
      参数:
      player - 玩家
      sound - 声音
      volume - 音量
      pitch - 音调
      从以下版本开始:
      1.0.7
    • playSound

      public static void playSound(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String sound, float volume, float pitch)
      播放声音 同步
      参数:
      player - 玩家
      sound - 声音 例: entity.item.pickup
      volume - 音量 例: 1F
      pitch - 音调 例: 1F
      从以下版本开始:
      1.1.6
    • performCommand

      public static void performCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家执行命令 chat方式
      参数:
      player - 玩家
      command - 命令
    • syncPerformCommand

      public static void syncPerformCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家执行命令 chat方式 同步
      参数:
      player - 玩家
      command - 命令
    • playerPerformCommand

      public static void playerPerformCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家执行命令 performCommand 方式
      参数:
      player - 玩家
      command - 命令
      从以下版本开始:
      1.1.2
    • syncPlayerPerformCommand

      public static void syncPlayerPerformCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家执行命令 performCommand 方式 同步
      参数:
      player - 玩家
      command - 命令
      从以下版本开始:
      1.1.5
    • openInventory

      public static void openInventory(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.Inventory inventory)
      玩家打开gui
      参数:
      player - 玩家
      inventory - gui
      从以下版本开始:
      1.1.8
    • syncOpenInventory

      public static void syncOpenInventory(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.inventory.Inventory inventory)
      玩家打开gui 使用同步
      参数:
      player - 玩家
      inventory - gui
      从以下版本开始:
      1.1.8
    • closeInventory

      public static void closeInventory(@NotNull @NotNull org.bukkit.entity.Player player)
      玩家关闭gui
      参数:
      player - 玩家
      从以下版本开始:
      1.1.9
    • syncCloseInventory

      public static void syncCloseInventory(@NotNull @NotNull org.bukkit.entity.Player player)
      玩家关闭gui 使用同步
      参数:
      player - 玩家
      从以下版本开始:
      1.1.9
    • performOpCommand

      public static void performOpCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家已OP身份执行命令 chat方式
      参数:
      player - 玩家
      command - 命令
    • syncPerformOpCommand

      public static void syncPerformOpCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家已OP身份执行命令 chat方式 同步
      参数:
      player - 玩家
      command - 命令
    • playerPerformOpCommand

      public static void playerPerformOpCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家已OP身份执行命令 performCommand 方式
      参数:
      player - 玩家
      command - 命令
      从以下版本开始:
      1.1.5
    • syncPlayerPerformOpCommand

      public static void syncPlayerPerformOpCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家已OP身份执行命令 performCommand 方式 同步
      参数:
      player - 玩家
      command - 命令
      从以下版本开始:
      1.1.5
    • dispatchCommand

      public static void dispatchCommand(@NotNull @NotNull String command)
      控制台执行命令
      参数:
      command - 命令
      从以下版本开始:
      1.1.4
    • syncDispatchCommand

      public static void syncDispatchCommand(@NotNull @NotNull String command)
      控制台执行命令 同步
      参数:
      command - 命令
      从以下版本开始:
      1.1.4
    • syncPerformReplaceCommand

      public static void syncPerformReplaceCommand(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String command)
      玩家执行替换命令 同步
      参数:
      player - 玩家
      command - 命令
      从以下版本开始:
      1.0.8
    • dropItem

      public static void dropItem(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull List<org.bukkit.inventory.ItemStack> dropItemList)
      掉落物品处理
      参数:
      player - 玩家
      dropItemList - 掉落物品
      从以下版本开始:
      1.2.0