类 VelocityPluginContext

java.lang.Object
cn.afternode.commons.velocity.VelocityPluginContext

public class VelocityPluginContext extends Object
Velocity plugin context implementation
  • 构造器概要

    构造器
    构造器
    说明
    VelocityPluginContext(com.velocitypowered.api.proxy.ProxyServer server)
    Create context in a server
  • 方法概要

    修饰符和类型
    方法
    说明
    net.kyori.adventure.text.ComponentLike
    Get line prefix for MessageBuilder
    cn.afternode.commons.localizations.ILocalizations
    Get localization provider
    com.velocitypowered.api.proxy.ProxyServer
     
    Create MessageBuilder with localizations and linePrefix in this context
    message(com.velocitypowered.api.command.CommandSource target)
    Create MessageBuilder with localizations and linePrefix in this context, and pass a message target
    void
    setLinePrefix(net.kyori.adventure.text.ComponentLike linePrefix)
    Set line prefix for MessageBuilder
    void
    setLocalizations(cn.afternode.commons.localizations.ILocalizations localizations)
    Set localization provider
    tab()
    Create TabBuilder
    tab(com.velocitypowered.api.command.CommandSource target)
    Create tab builder and pass a CommandSource

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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • VelocityPluginContext

      public VelocityPluginContext(com.velocitypowered.api.proxy.ProxyServer server)
      Create context in a server
      参数:
      server - server
  • 方法详细资料

    • getServer

      public com.velocitypowered.api.proxy.ProxyServer getServer()
    • setLocalizations

      public void setLocalizations(cn.afternode.commons.localizations.ILocalizations localizations)
      Set localization provider
      参数:
      localizations - param
    • getLocalizations

      public cn.afternode.commons.localizations.ILocalizations getLocalizations()
      Get localization provider
      返回:
      Localizations
    • getLinePrefix

      public net.kyori.adventure.text.ComponentLike getLinePrefix()
      Get line prefix for MessageBuilder
      返回:
      Line prefix
      另请参阅:
    • setLinePrefix

      public void setLinePrefix(net.kyori.adventure.text.ComponentLike linePrefix)
      Set line prefix for MessageBuilder
      参数:
      linePrefix - prefix
      另请参阅:
    • message

      public MessageBuilder message()
      Create MessageBuilder with localizations and linePrefix in this context
      返回:
      builder
    • message

      public MessageBuilder message(com.velocitypowered.api.command.CommandSource target)
      Create MessageBuilder with localizations and linePrefix in this context, and pass a message target
      参数:
      target - Message target
      返回:
      builder
    • tab

      public TabBuilder tab()
      Create TabBuilder
      返回:
      builder
    • tab

      public TabBuilder tab(com.velocitypowered.api.command.CommandSource target)
      Create tab builder and pass a CommandSource
      参数:
      target - target
      返回:
      builder