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

    Constructors
    Constructor
    Description
    Constructs a new `OpenCommand` with the default label "open".
    OpenCommand(@NotNull String label)
    Constructs a new `OpenCommand` with the specified label.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected @NotNull io.github.toberocat.toberocore.command.arguments.Argument<?>[]
     
    protected boolean
    handle(@NotNull org.bukkit.entity.Player player, @NotNull String[] args)
     
    protected @NotNull io.github.toberocat.toberocore.command.options.Options
     
    @Nullable List<String>
    routeTab(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] args)
     

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OpenCommand

      public OpenCommand()
      Constructs a new `OpenCommand` with the default label "open".
    • OpenCommand

      public OpenCommand(@NotNull @NotNull String label)
      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 class io.github.toberocat.toberocore.command.SubCommand
    • arguments

      @NotNull protected @NotNull io.github.toberocat.toberocore.command.arguments.Argument<?>[] arguments()
      Specified by:
      arguments in class io.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 class io.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 class io.github.toberocat.toberocore.command.SubCommand
      Throws:
      io.github.toberocat.toberocore.command.exceptions.CommandException