Package org.geysermc.geyser.command
Class GeyserCommand
java.lang.Object
org.geysermc.geyser.command.GeyserCommand
- All Implemented Interfaces:
org.geysermc.geyser.api.command.Command
- Direct Known Subclasses:
AdvancedTooltipsCommand,AdvancementsCommand,ConnectionTestCommand,DumpCommand,ExtensionsCommand,GeyserExtensionCommand,HelpCommand,ListCommand,OffhandCommand,ReloadCommand,SettingsCommand,StatisticsCommand,StopCommand,VersionCommand
public abstract class GeyserCommand
extends Object
implements org.geysermc.geyser.api.command.Command
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.api.command.Command
org.geysermc.geyser.api.command.Command.Builder<T extends org.geysermc.geyser.api.command.CommandSource> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaliases()The description of the command - will attempt to be translated.abstract voidexecute(@Nullable GeyserSession session, GeyserCommandSource sender, String[] args) booleanIf false, hides the command from being shown on the Geyser Standalone GUI.booleanUsed for permission defaults on server implementations.name()voidsetAliases(List<String> aliases) Used in the GUI to know what subcommands can be runMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.command.Command
isBedrockOnly
-
Field Details
-
name
-
description
The description of the command - will attempt to be translated. -
permission
-
-
Constructor Details
-
GeyserCommand
-
-
Method Details
-
execute
public abstract void execute(@Nullable GeyserSession session, GeyserCommandSource sender, String[] args) -
isExecutableOnConsole
public boolean isExecutableOnConsole()If false, hides the command from being shown on the Geyser Standalone GUI.- Specified by:
isExecutableOnConsolein interfaceorg.geysermc.geyser.api.command.Command- Returns:
- true if the command can be run on the server console
-
subCommands
Used in the GUI to know what subcommands can be run- Specified by:
subCommandsin interfaceorg.geysermc.geyser.api.command.Command- Returns:
- a list of all possible subcommands, or empty if none.
-
setAliases
-
isSuggestedOpOnly
public boolean isSuggestedOpOnly()Used for permission defaults on server implementations.- Specified by:
isSuggestedOpOnlyin interfaceorg.geysermc.geyser.api.command.Command- Returns:
- if this command is designated to be used only by server operators.
-
name
- Specified by:
namein interfaceorg.geysermc.geyser.api.command.Command
-
description
The description of the command - will attempt to be translated.- Specified by:
descriptionin interfaceorg.geysermc.geyser.api.command.Command
-
permission
- Specified by:
permissionin interfaceorg.geysermc.geyser.api.command.Command
-
aliases
- Specified by:
aliasesin interfaceorg.geysermc.geyser.api.command.Command
-