Class PainterCommands
java.lang.Object
co.aikar.commands.BaseCommand
dev.despical.pixelpainter.command.PainterCommands
public final class PainterCommands
extends co.aikar.commands.BaseCommand
Receives ACF invocations and dispatches validated painting requests.
Each action passes through shared permission checks and configured error panels. Actions are registered once as handlers, so a new command needs a catalog entry and a handler without touching dispatch. The dispatcher parses arguments, captures request settings and delegates to file/image workers or the server-thread painting service.
Per-player tokens suppress stale preparation results after cancellation or disconnect. File operations retain reservations until completion because cancellation cannot roll back a source mutation. Worker callbacks return through the plugin scheduler before accessing player or world state.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<CommandAction> Defines the immutable, ordered command catalog shared by dispatch and help. -
Constructor Summary
ConstructorsConstructorDescriptionPainterCommands(PixelPainter plugin) Creates command dispatch and panel renderers for an enabled plugin. -
Method Summary
Modifier and TypeMethodDescriptionvoidRoutes preparation or active-world-job cancellation.voidconfirm(org.bukkit.command.CommandSender sender) Runs the world-border override offered after a create request crossed the border.voidRoutes creation requests through common validation and permissions.voidRoutes source deletion without deleting paintings or journals.voidRoutes bounded source-image downloads.voidRoutes paginated, permission-filtered help.voidRoutes accessible undo-history listings.voidRoutes asynchronous source-file listings.voidRoutes palette-family listings.voidRoutes estimates and the legacy block-count alias.voidForgets cancellable preparations while retaining active file reservations.voidregisterCompletions(co.aikar.commands.BukkitCommandManager manager) Registers completions from cached names, directions and accessible history.voidRoutes publication of validated configuration resources.voidOpens help for empty input and renders the unknown-command panel otherwise.voidRoutes source-dimension requests and their information alias.voidRoutes owner-aware journal restoration.Methods inherited from class co.aikar.commands.BaseCommand
canExecute, doHelp, doHelp, getCommandHelp, getContextFlags, getCurrentCommandIssuer, getCurrentCommandManager, getDefaultRegisteredCommand, getExceptionHandler, getExecCommandLabel, getExecSubcommand, getLastCommandOperationContext, getName, getOrigArgs, getRegisteredCommands, getRequiredPermissions, getSubCommands, hasPermission, hasPermission, help, help, requiresPermission, setContextFlags, setExceptionHandler, showCommandHelp, showSyntax, tabComplete, tabComplete
-
Field Details
-
ACTIONS
Defines the immutable, ordered command catalog shared by dispatch and help.
-
-
Constructor Details
-
PainterCommands
Creates command dispatch and panel renderers for an enabled plugin.- Parameters:
plugin- owning plugin
-
-
Method Details
-
registerCompletions
public void registerCompletions(co.aikar.commands.BukkitCommandManager manager) Registers completions from cached names, directions and accessible history.- Parameters:
manager- ACF manager owning these commands
-
root
Opens help for empty input and renders the unknown-command panel otherwise.- Parameters:
sender- command audienceargs- arguments after the root command
-
create
Routes creation requests through common validation and permissions.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
confirm
public void confirm(org.bukkit.command.CommandSender sender) Runs the world-border override offered after a create request crossed the border.- Parameters:
sender- command audience
-
preview
Routes estimates and the legacy block-count alias.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
undo
Routes owner-aware journal restoration.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
cancel
Routes preparation or active-world-job cancellation.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
list
Routes asynchronous source-file listings.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
history
Routes accessible undo-history listings.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
materials
Routes palette-family listings.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
specs
Routes source-dimension requests and their information alias.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
download
Routes bounded source-image downloads.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
delete
Routes source deletion without deleting paintings or journals.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
reload
Routes publication of validated configuration resources.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
help
Routes paginated, permission-filtered help.- Parameters:
sender- command audienceargs- positional arguments after the subcommand
-
quit
Forgets cancellable preparations while retaining active file reservations.- Parameters:
owner- departing player UUID
-