public final class VelocityVisitors
extends java.lang.Object
Accept individual functions using Lamp.Builder#accept(LampBuilderVisitor)
| Constructor and Description |
|---|
VelocityVisitors() |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull revxrsal.commands.LampVisitor<VelocityCommandActor> |
brigadier(@NotNull com.velocitypowered.api.proxy.ProxyServer server)
Registers the commands into Velocity as
brigadier commands. |
static <A extends VelocityCommandActor> |
brigadier(@NotNull com.velocitypowered.api.proxy.ProxyServer server,
@NotNull ActorFactory<A> actorFactory)
Registers the commands into Velocity as
brigadier commands. |
static <A extends VelocityCommandActor> |
brigadier(@NotNull com.velocitypowered.api.proxy.ProxyServer server,
@NotNull ActorFactory<A> actorFactory,
@NotNull revxrsal.commands.brigadier.types.ArgumentTypes<A> argumentTypes)
Registers the commands into Velocity as
brigadier commands. |
static <A extends VelocityCommandActor> |
brigadier(@NotNull VelocityLampConfig<A> config)
Registers the commands into Velocity as
brigadier commands. |
static <A extends VelocityCommandActor> |
legacyColorCodes()
Makes the default format for
CommandActor.reply(String) and CommandActor.error(String)
take the legacy ampersand ChatColor-coded format |
static <A extends VelocityCommandActor> |
pluginContextParameters(java.lang.Object plugin)
Adds dependencies and type resolvers for the given plugin object
|
static <A extends VelocityCommandActor> |
velocityExceptionHandler()
Handles the default Velocity exceptions
|
static <A extends VelocityCommandActor> |
velocityParameterTypes(@NotNull com.velocitypowered.api.proxy.ProxyServer server)
Registers the following parameter types:
Player
|
static <A extends VelocityCommandActor> |
velocityPermissions()
Adds support for the
CommandPermission annotation |
static <A extends VelocityCommandActor> |
velocitySenderResolver()
Resolves the sender type
CommandSource and Player
for parameters that come first in the command. |
@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> legacyColorCodes()
CommandActor.reply(String) and CommandActor.error(String)
take the legacy ampersand ChatColor-coded formatA - The actor type@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> velocityExceptionHandler()
A - The actor type@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> velocitySenderResolver()
CommandSource and Player
for parameters that come first in the command.A - The actor type@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> velocityParameterTypes(@NotNull @NotNull com.velocitypowered.api.proxy.ProxyServer server)
PlayerA - The actor typeserver - The server@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> pluginContextParameters(java.lang.Object plugin)
A - The actor typeplugin - Plugin to supply@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampBuilderVisitor<A> velocityPermissions()
CommandPermission annotationA - The actor type@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampVisitor<A> brigadier(@NotNull @NotNull VelocityLampConfig<A> config)
brigadier commands.A - The actor typeconfig - The VelocityLampConfig object@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampVisitor<A> brigadier(@NotNull @NotNull com.velocitypowered.api.proxy.ProxyServer server, @NotNull @NotNull ActorFactory<A> actorFactory, @NotNull @NotNull revxrsal.commands.brigadier.types.ArgumentTypes<A> argumentTypes)
brigadier commands.A - The actor typeserver - The server instanceactorFactory - The actor factoryargumentTypes - The argument type registry@NotNull public static <A extends VelocityCommandActor> @NotNull revxrsal.commands.LampVisitor<A> brigadier(@NotNull @NotNull com.velocitypowered.api.proxy.ProxyServer server, @NotNull @NotNull ActorFactory<A> actorFactory)
brigadier commands.A - The actor typeserver - The server instanceactorFactory - The actor factory@NotNull public static @NotNull revxrsal.commands.LampVisitor<VelocityCommandActor> brigadier(@NotNull @NotNull com.velocitypowered.api.proxy.ProxyServer server)
brigadier commands.server - The server instance