类 TabBuilder

java.lang.Object
cn.afternode.commons.velocity.message.TabBuilder

public class TabBuilder extends Object
Velocity tab complete builder implementation
  • 构造器详细资料

    • TabBuilder

      public TabBuilder(com.velocitypowered.api.proxy.ProxyServer server, com.velocitypowered.api.command.CommandSource source)
      Create with server and specified target
      参数:
      server - Server
      source - Target
    • TabBuilder

      public TabBuilder(com.velocitypowered.api.proxy.ProxyServer server)
      Create with server
      参数:
      server - server
    • TabBuilder

      public TabBuilder()
      Create without parameters
  • 方法详细资料

    • target

      public com.velocitypowered.api.command.CommandSource target()
      Get current target
      返回:
      target
    • target

      public TabBuilder target(com.velocitypowered.api.command.CommandSource target)
      Set current target
      参数:
      target - target
      返回:
      this
    • server

      public com.velocitypowered.api.proxy.ProxyServer server()
      Get current server
      返回:
      server
    • server

      public TabBuilder server(com.velocitypowered.api.proxy.ProxyServer server)
      Set current server
      参数:
      server - server
      返回:
      this
    • add

      public TabBuilder add(String... items)
      Add items
      参数:
      items - items
      返回:
      this
    • add

      public TabBuilder add(String prefix, String... items)
      Add items with prefix
      参数:
      prefix - prefix
      items - items
      返回:
      this
    • players

      public TabBuilder players()
      Add all online players' names
      返回:
      this
    • players

      public TabBuilder players(com.velocitypowered.api.proxy.ServerConnection server)
      Add all online players in a server
      参数:
      server - server
      返回:
      this
    • players

      public TabBuilder players(String prefix)
      Filter all online players' names and add
      参数:
      prefix - prefix
      返回:
      this
    • players

      public TabBuilder players(com.velocitypowered.api.proxy.ProxyServer server, String prefix)
      Add all online players' names with prefix and server
      参数:
      server - server
      prefix - prefix
      返回:
      this
    • players

      public TabBuilder players(Predicate<com.velocitypowered.api.proxy.Player> filter)
      Add all online players' names with custom filter
      参数:
      filter - filter
      返回:
      this
    • build

      public List<String> build()
      Build to string list (Create new list object)
      返回:
      result