Enum Class PaintError

java.lang.Object
java.lang.Enum<PaintError>
dev.despical.pixelpainter.core.PaintError
All Implemented Interfaces:
Serializable, Comparable<PaintError>, Constable

public enum PaintError extends Enum<PaintError>
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.

  • Enum Constant Details

    • PERMISSION

      public static final PaintError PERMISSION
      The sender lacks the command permission.
    • PLAYER

      public static final PaintError PLAYER
      The command requires a player sender.
    • USAGE

      public static final PaintError USAGE
      The argument count is wrong.
    • UNKNOWN_COMMAND

      public static final PaintError UNKNOWN_COMMAND
      The subcommand does not exist.
    • NUMBER

      public static final PaintError NUMBER
      A positive whole number was expected.
    • BOOLEAN

      public static final PaintError BOOLEAN
      A true or false option was expected.
    • DIRECTION

      public static final PaintError DIRECTION
      The direction name is unknown.
    • PALETTE

      public static final PaintError PALETTE
      The palette name is unknown.
    • FILENAME

      public static final PaintError FILENAME
      The image file name is unsafe or malformed.
    • PAGE

      public static final PaintError PAGE
      The requested page does not exist.
    • MISSING_IMAGE

      public static final PaintError MISSING_IMAGE
      No image matches the name.
    • AMBIGUOUS_IMAGE

      public static final PaintError AMBIGUOUS_IMAGE
      More than one image matches the name.
    • IMAGE_EXISTS

      public static final PaintError IMAGE_EXISTS
      An image with this name exists already.
    • IMAGE_FORMAT

      public static final PaintError IMAGE_FORMAT
      The file is not a readable PNG, JPEG or WebP image.
    • FILE_SIZE

      public static final PaintError FILE_SIZE
      The file is larger than the configured limit.
    • SOURCE_SIZE

      public static final PaintError SOURCE_SIZE
      The decoded image is larger than the configured limit.
    • SIZE

      public static final PaintError SIZE
      The painting exceeds the height or block limit.
    • DOWNLOAD_HOST

      public static final PaintError DOWNLOAD_HOST
      The download host is not allowed.
    • DOWNLOAD_FAILED

      public static final PaintError DOWNLOAD_FAILED
      The download failed.
    • PREPARING

      public static final PaintError PREPARING
      An image request of the player is still being prepared.
    • FILE_BUSY

      public static final PaintError FILE_BUSY
      A file operation of the player is still running.
    • QUEUE_FULL

      public static final PaintError QUEUE_FULL
      The worker queue rejected the task.
    • BUSY

      public static final PaintError BUSY
      Another world operation is running.
    • NO_JOB

      public static final PaintError NO_JOB
      The player has no job to cancel.
    • MISSING_HISTORY

      public static final PaintError MISSING_HISTORY
      No accessible journal matches.
    • HISTORY_FULL

      public static final PaintError HISTORY_FULL
      The undo storage limit is reached.
    • WORLD

      public static final PaintError WORLD
      The world is unavailable.
    • BOUNDS

      public static final PaintError BOUNDS
      The painting leaves the world bounds.
    • BORDER

      public static final PaintError BORDER
      The painting crosses the world border, which a confirmed request may ignore.
    • CHUNKS

      public static final PaintError CHUNKS
      The painting spans too many chunks.
    • OVERLAP

      public static final PaintError OVERLAP
      The area overlaps a saved painting.
    • BLOCK_ENTITY

      public static final PaintError BLOCK_ENTITY
      The area contains a block entity.
  • Method Details

    • values

      public static PaintError[] 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

      public static PaintError valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • key

      public String key()
      Returns the message key whose -title companion forms the panel.
      Returns:
      full message key
    • toString

      public String toString()
      Overrides:
      toString in class Enum<PaintError>