Enum Class PaintError
- All Implemented Interfaces:
Serializable, Comparable<PaintError>, Constable
Enumerates user-correctable failures and the message each one resolves to.
Replaces free-form error strings so every failure that can reach a command sender is checked by the compiler and mapped to a bundled panel message.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMore than one image matches the name.The area contains a block entity.A true or false option was expected.The painting crosses the world border, which a confirmed request may ignore.The painting leaves the world bounds.Another world operation is running.The painting spans too many chunks.The direction name is unknown.The download failed.The download host is not allowed.A file operation of the player is still running.The file is larger than the configured limit.The image file name is unsafe or malformed.The undo storage limit is reached.An image with this name exists already.The file is not a readable PNG, JPEG or WebP image.No accessible journal matches.No image matches the name.The player has no job to cancel.A positive whole number was expected.The area overlaps a saved painting.The requested page does not exist.The palette name is unknown.The sender lacks the command permission.The command requires a player sender.An image request of the player is still being prepared.The worker queue rejected the task.The painting exceeds the height or block limit.The decoded image is larger than the configured limit.The subcommand does not exist.The argument count is wrong.The world is unavailable. -
Method Summary
Modifier and TypeMethodDescriptionkey()Returns the message key whose-titlecompanion forms the panel.toString()static PaintErrorReturns the enum constant of this class with the specified name.static PaintError[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PERMISSION
The sender lacks the command permission. -
PLAYER
The command requires a player sender. -
USAGE
The argument count is wrong. -
UNKNOWN_COMMAND
The subcommand does not exist. -
NUMBER
A positive whole number was expected. -
BOOLEAN
A true or false option was expected. -
DIRECTION
The direction name is unknown. -
PALETTE
The palette name is unknown. -
FILENAME
The image file name is unsafe or malformed. -
PAGE
The requested page does not exist. -
MISSING_IMAGE
No image matches the name. -
AMBIGUOUS_IMAGE
More than one image matches the name. -
IMAGE_EXISTS
An image with this name exists already. -
IMAGE_FORMAT
The file is not a readable PNG, JPEG or WebP image. -
FILE_SIZE
The file is larger than the configured limit. -
SOURCE_SIZE
The decoded image is larger than the configured limit. -
SIZE
The painting exceeds the height or block limit. -
DOWNLOAD_HOST
The download host is not allowed. -
DOWNLOAD_FAILED
The download failed. -
PREPARING
An image request of the player is still being prepared. -
FILE_BUSY
A file operation of the player is still running. -
QUEUE_FULL
The worker queue rejected the task. -
BUSY
Another world operation is running. -
NO_JOB
The player has no job to cancel. -
MISSING_HISTORY
No accessible journal matches. -
HISTORY_FULL
The undo storage limit is reached. -
WORLD
The world is unavailable. -
BOUNDS
The painting leaves the world bounds. -
BORDER
The painting crosses the world border, which a confirmed request may ignore. -
CHUNKS
The painting spans too many chunks. -
OVERLAP
The area overlaps a saved painting. -
BLOCK_ENTITY
The area contains a block entity.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
key
Returns the message key whose-titlecompanion forms the panel.- Returns:
- full message key
-
toString
- Overrides:
toStringin classEnum<PaintError>
-