Interface ScriptPlatform


public interface ScriptPlatform
原框架游戏语句使用的服务器能力:广播、标题、音效、坐标、物品与侧边栏。 参数中的玩家与返回的对象由宿主平台决定(Bukkit 下为 Player、Location、ItemStack、Material)。
  • Method Details

    • onlinePlayerNames

      List<String> onlinePlayerNames()
    • broadcast

      void broadcast(String message)
    • console

      Object console()
      控制台发送者,switch console 使用。
    • player

      Object player(String name)
      按名称查找在线玩家,找不到返回 null。
    • actionBar

      void actionBar(Object player, String message)
    • title

      void title(Object player, String title, String subtitle, int fadeIn, int stay, int fadeOut)
    • playSound

      void playSound(Object player, String sound, float volume, float pitch)
      sound 以 resource: 开头时为资源包音效名,否则为枚举名。
    • stopSound

      void stopSound(Object player, String sound)
    • location

      Object location(String world, double x, double y, double z, float yaw, float pitch)
    • material

      Object material(String name)
    • itemStack

      Object itemStack(String material)
    • scoreboard

      default void scoreboard(Object player, List<String> lines)
      显示侧边栏,lines 首行为标题;lines 为 null 时移除。默认不支持。