类 VelocityPluginContext
java.lang.Object
cn.afternode.commons.velocity.VelocityPluginContext
Velocity plugin context implementation
-
构造器概要
构造器构造器说明VelocityPluginContext(com.velocitypowered.api.proxy.ProxyServer server) Create context in a server -
方法概要
修饰符和类型方法说明net.kyori.adventure.text.ComponentLikeGet line prefix for MessageBuildercn.afternode.commons.localizations.ILocalizationsGet localization providercom.velocitypowered.api.proxy.ProxyServermessage()Create MessageBuilder with localizations and linePrefix in this contextmessage(com.velocitypowered.api.command.CommandSource target) Create MessageBuilder with localizations and linePrefix in this context, and pass a message targetvoidsetLinePrefix(net.kyori.adventure.text.ComponentLike linePrefix) Set line prefix for MessageBuildervoidsetLocalizations(cn.afternode.commons.localizations.ILocalizations localizations) Set localization providertab()Create TabBuildertab(com.velocitypowered.api.command.CommandSource target) Create tab builder and pass a CommandSource
-
构造器详细资料
-
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
Create MessageBuilder with localizations and linePrefix in this context- 返回:
- builder
-
message
Create MessageBuilder with localizations and linePrefix in this context, and pass a message target- 参数:
target- Message target- 返回:
- builder
-
tab
Create TabBuilder- 返回:
- builder
-
tab
Create tab builder and pass a CommandSource- 参数:
target- target- 返回:
- builder
-