Class OpenCommand
java.lang.Object
io.github.toberocat.toberocore.command.Command
io.github.toberocat.toberocore.command.SubCommand
io.github.toberocat.toberocore.command.PlayerSubCommand
io.github.toberocat.guiengine.commands.OpenCommand
- Direct Known Subclasses:
DumpCommand
public class OpenCommand
extends io.github.toberocat.toberocore.command.PlayerSubCommand
The `OpenCommand` class represents a player sub-command that allows a player to open a GUI using the `GuiEngineApi`.
This class is licensed under the GNU General Public License.
- Since:
- 07.04.2023
- Author:
- Tobias Madlberger (Tobias)
-
Field Summary
Fields inherited from class io.github.toberocat.toberocore.command.SubCommand
args, label, onCommandOptions, onTabOptions
Fields inherited from class io.github.toberocat.toberocore.command.Command
children, parent, prefix
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new `OpenCommand` with the default label "open".OpenCommand
(@NotNull String label) Constructs a new `OpenCommand` with the specified label. -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull io.github.toberocat.toberocore.command.arguments.Argument<?>[]
protected boolean
protected @NotNull io.github.toberocat.toberocore.command.options.Options
options()
Methods inherited from class io.github.toberocat.toberocore.command.PlayerSubCommand
handleCommand
Methods inherited from class io.github.toberocat.toberocore.command.SubCommand
getArgs, getConfig, getConfig, parseArgs, routeCall, showInTab
Methods inherited from class io.github.toberocat.toberocore.command.Command
addChild, childrenTabList, getChild, getChildren, getLabel, getParent, getPermission, searchChild
-
Constructor Details
-
OpenCommand
public OpenCommand()Constructs a new `OpenCommand` with the default label "open". -
OpenCommand
Constructs a new `OpenCommand` with the specified label.- Parameters:
label
- The label for this command.
-
-
Method Details
-
options
@NotNull protected @NotNull io.github.toberocat.toberocore.command.options.Options options()- Specified by:
options
in classio.github.toberocat.toberocore.command.SubCommand
-
arguments
@NotNull protected @NotNull io.github.toberocat.toberocore.command.arguments.Argument<?>[] arguments()- Specified by:
arguments
in classio.github.toberocat.toberocore.command.SubCommand
-
handle
protected boolean handle(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String[] args) throws io.github.toberocat.toberocore.command.exceptions.CommandException - Specified by:
handle
in classio.github.toberocat.toberocore.command.PlayerSubCommand
- Throws:
io.github.toberocat.toberocore.command.exceptions.CommandException
-
routeTab
@Nullable public @Nullable List<String> routeTab(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String[] args) throws io.github.toberocat.toberocore.command.exceptions.CommandException - Overrides:
routeTab
in classio.github.toberocat.toberocore.command.SubCommand
- Throws:
io.github.toberocat.toberocore.command.exceptions.CommandException
-