Class VelocityWrap
java.lang.Object
one.tranic.t.velocity.command.warp.VelocityWrap
- All Implemented Interfaces:
com.velocitypowered.api.command.Command,com.velocitypowered.api.command.InvocableCommand<com.velocitypowered.api.command.SimpleCommand.Invocation>,com.velocitypowered.api.command.SimpleCommand
A wrapper class that adapts a
SimpleCommand to work within the Velocity platform
by implementing the SimpleCommand interface.
This class facilitates the execution, completion suggestions, and permission checking
for commands using a VelocitySource as the source context.
It leverages an instance of a SimpleCommand with a VelocitySource type
to effectively handle command functionalities, including execution and suggestions,
while adhering to Velocity's command structure.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.velocitypowered.api.command.SimpleCommand
com.velocitypowered.api.command.SimpleCommand.Invocation -
Constructor Summary
ConstructorsConstructorDescriptionVelocityWrap(one.tranic.t.base.command.simple.SimpleCommand<VelocitySource> command) -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(com.velocitypowered.api.command.SimpleCommand.Invocation invocation) booleanhasPermission(com.velocitypowered.api.command.SimpleCommand.Invocation invocation) suggest(com.velocitypowered.api.command.SimpleCommand.Invocation invocation) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.velocitypowered.api.command.InvocableCommand
suggestAsync
-
Constructor Details
-
VelocityWrap
-
-
Method Details
-
execute
public void execute(com.velocitypowered.api.command.SimpleCommand.Invocation invocation) - Specified by:
executein interfacecom.velocitypowered.api.command.InvocableCommand<com.velocitypowered.api.command.SimpleCommand.Invocation>
-
suggest
- Specified by:
suggestin interfacecom.velocitypowered.api.command.InvocableCommand<com.velocitypowered.api.command.SimpleCommand.Invocation>
-
hasPermission
public boolean hasPermission(com.velocitypowered.api.command.SimpleCommand.Invocation invocation) - Specified by:
hasPermissionin interfacecom.velocitypowered.api.command.InvocableCommand<com.velocitypowered.api.command.SimpleCommand.Invocation>
-