Class BungeeCommandFactory
- java.lang.Object
-
- com.github.siroshun09.mccommand.bungee.BungeeCommandFactory
-
public final class BungeeCommandFactory extends Object
The class for registering commands to BungeeCord.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
register(@NotNull Plugin plugin, @NotNull Command command)
Registers the command.static void
registerAsync(@NotNull Plugin plugin, @NotNull Command command)
Registers the command.static void
registerAsync(@NotNull Plugin plugin, @NotNull Command command, @NotNull Executor executor)
Registers the command.
-
-
-
Method Detail
-
register
public static void register(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Command command)
Registers the command.- Parameters:
plugin
- the BungeeCord plugincommand
- the command to register
-
registerAsync
public static void registerAsync(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Command command)
Registers the command.If you register a command with this method, it will be executed asynchronously.
Note:
The tab completion will execute on main thread.
- Parameters:
plugin
- the BungeeCord plugincommand
- the command to register
-
registerAsync
public static void registerAsync(@NotNull @NotNull Plugin plugin, @NotNull @NotNull Command command, @NotNull @NotNull Executor executor)
Registers the command.If you register a command with this method, it will be executed asynchronously.
Note:
The tab completion will execute on main thread.
- Parameters:
plugin
- the BungeeCord plugincommand
- the command to registerexecutor
- the executor to run command
-
-