Class SpigotBootCommand
java.lang.Object
org.bukkit.command.Command
tech.guilhermekaua.spigotboot.commands.spigot.SpigotBootCommand
public class SpigotBootCommand
extends org.bukkit.command.Command
-
Field Summary
Fields inherited from class org.bukkit.command.Command
description, timings, usageMessage -
Constructor Summary
ConstructorsConstructorDescriptionSpigotBootCommand(tech.guilhermekaua.spigotboot.core.context.Context context, CompiledRootCommand rootCommand, CommandDispatcher dispatcher, CommandPlatformSupport commandPlatformSupport) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(@NotNull org.bukkit.command.CommandSender sender, @NotNull String commandLabel, @NotNull String[] args) @Nullable StringReturnsnullso Bukkit carries no static permission for this command; visibility is computed per-sender intestPermissionSilent(CommandSender)instead.booleanisOwnedBy(tech.guilhermekaua.spigotboot.core.plugin.BootPlugin bootPlugin) tabComplete(@NotNull org.bukkit.command.CommandSender sender, @NotNull String alias, @NotNull String[] args) booleantestPermissionSilent(@NotNull org.bukkit.command.CommandSender target) Reports whethertargetcan use at least one route of this command.Methods inherited from class org.bukkit.command.Command
broadcastCommandMessage, broadcastCommandMessage, broadcastCommandMessage, broadcastCommandMessage, getAliases, getDescription, getLabel, getName, getPermissionMessage, getTimingName, getUsage, isRegistered, permissionMessage, permissionMessage, register, setAliases, setDescription, setLabel, setName, setPermission, setPermissionMessage, setUsage, tabComplete, testPermission, toString, unregister
-
Constructor Details
-
SpigotBootCommand
public SpigotBootCommand(tech.guilhermekaua.spigotboot.core.context.Context context, CompiledRootCommand rootCommand, CommandDispatcher dispatcher, CommandPlatformSupport commandPlatformSupport)
-
-
Method Details
-
execute
public boolean execute(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String commandLabel, @NotNull @NotNull String[] args) - Specified by:
executein classorg.bukkit.command.Command
-
tabComplete
@NotNull public @NotNull List<String> tabComplete(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String alias, @NotNull @NotNull String[] args) throws IllegalArgumentException - Overrides:
tabCompletein classorg.bukkit.command.Command- Throws:
IllegalArgumentException
-
isOwnedBy
public boolean isOwnedBy(tech.guilhermekaua.spigotboot.core.plugin.BootPlugin bootPlugin) -
getRootCommand
-
getPermission
Returnsnullso Bukkit carries no static permission for this command; visibility is computed per-sender intestPermissionSilent(CommandSender)instead. Per-route permissions (@Permission) are enforced byCommandDispatcherduring both dispatch and tab-completion.- Overrides:
getPermissionin classorg.bukkit.command.Command
-
testPermissionSilent
public boolean testPermissionSilent(@NotNull @NotNull org.bukkit.command.CommandSender target) Reports whethertargetcan use at least one route of this command. CraftBukkit builds each command's client-side command-tree node with arequires(...)predicate backed by this method, so returning the route-aware result hides the command in tab completion from senders who can run none of its subcommands (nor its default handler). Execution is unaffected — Bukkit's command dispatch does not consult permissions — soCommandDispatcherstill enforces per-route @Permission duringexecute(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[])andtabComplete(org.bukkit.command.CommandSender, java.lang.String, java.lang.String[])for senders who pass this gate.- Overrides:
testPermissionSilentin classorg.bukkit.command.Command- Parameters:
target- the sender being tested- Returns:
trueiftargetcan use at least one of this command's routes
-