public class CommandStore
The console mod's internal command storage. You can retrieve detailed information on the loaded commands using this class.
Modifier and Type | Class and Description |
---|---|
static class |
CommandStore.StoredCommand
Contains detailed information on a loaded command.
|
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
getAliases()
Returns all aliases currently registered by the mod.
|
static java.util.List<java.lang.String> |
getApplicableCommands()
Returns all commands applicable in the given CommandContext. A command will only be excluded if it contains the opposite tag and does not contain the matching one (ex: for
CommandContext#CAMPAIGN_MAP , commands will only be excluded if they contain the tag "combat" but not the tag "campaign". |
static java.util.List<java.lang.String> |
getCommandsWithTag()
Returns all commands with a specific tag.
|
static java.util.List<java.lang.String> |
getKnownTags()
Returns all command tags that the mod is currently aware of.
|
static java.util.List<java.lang.String> |
getLoadedCommands()
Returns all commands currently loaded by the mod.
|
static void |
reloadCommands()
Forces the console to clear its stored commands and reload them from the CSV. If a command fails to load it will not throw an Exception. Instead it will display an error message to the player and continue to load the rest of the commands normally.
|
static CommandStore.StoredCommand |
retrieveCommand()
Retrieves the raw data for a specific command.
|
public static void reloadCommands()
Forces the console to clear its stored commands and reload them from the CSV. If a command fails to load it will not throw an Exception. Instead it will display an error message to the player and continue to load the rest of the commands normally.
CommonStrings#PATH_CSV
does not exist or can't be opened.public static java.util.List<java.lang.String> getLoadedCommands()
Returns all commands currently loaded by the mod.
public static java.util.List<java.lang.String> getApplicableCommands()
Returns all commands applicable in the given CommandContext. A command will only be excluded if it contains the opposite tag and does not contain the matching one (ex: for CommandContext#CAMPAIGN_MAP
, commands will only be excluded if they contain the tag "combat" but not the tag "campaign".
public static java.util.Map<java.lang.String,java.lang.String> getAliases()
Returns all aliases currently registered by the mod.
public static java.util.List<java.lang.String> getKnownTags()
Returns all command tags that the mod is currently aware of.
public static java.util.List<java.lang.String> getCommandsWithTag()
Returns all commands with a specific tag.
tag
.public static CommandStore.StoredCommand retrieveCommand()
Retrieves the raw data for a specific command.