Klasse ApplicationException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
de.delinkedde.areashopreborn.application.ApplicationException
Alle implementierten Schnittstellen:
LocalizedFailure, Serializable

public final class ApplicationException extends RuntimeException implements LocalizedFailure
Represents an expected, user-facing application rule violation.
Siehe auch:
  • Konstruktordetails

    • ApplicationException

      public ApplicationException(String message)
      Creates an expected application exception.
      Parameter:
      message - user-facing explanation
    • ApplicationException

      public ApplicationException(String messageKey, String fallbackMessage, Map<String,?> placeholders)
      Creates a localizable expected application exception.
      Parameter:
      messageKey - YAML message path
      fallbackMessage - fallback MiniMessage template
      placeholders - safely escaped dynamic placeholder values
  • Methodendetails

    • regionNotFound

      public static ApplicationException regionNotFound(String name)
      Creates a localized missing-region failure.
      Parameter:
      name - requested region name
      Gibt zurück:
      expected application failure
    • notCity

      public static ApplicationException notCity()
      Creates a wrong-region-type failure for a city operation.
      Gibt zurück:
      localized failure indicating that the selected region is not a city
    • notParcel

      public static ApplicationException notParcel()
      Creates a wrong-region-type failure for a parcel operation.
      Gibt zurück:
      localized failure indicating that the selected region is not a parcel
    • noParentCity

      public static ApplicationException noParentCity()
      Creates a missing-parent failure.
      Gibt zurück:
      localized failure indicating that a parcel has no managed parent city
    • cannotManageCity

      public static ApplicationException cannotManageCity()
      Creates a denied city-management failure.
      Gibt zurück:
      localized failure for denied city management
    • cannotManageRegion

      public static ApplicationException cannotManageRegion()
      Creates a denied region-management failure.
      Gibt zurück:
      localized failure for denied region management
    • noActiveListing

      public static ApplicationException noActiveListing()
      Creates a missing-listing failure.
      Gibt zurück:
      localized failure for a region without an active listing
    • insufficientFunds

      public static ApplicationException insufficientFunds()
      Creates an insufficient-funds failure.
      Gibt zurück:
      localized insufficient-funds failure
    • noRegionAccess

      public static ApplicationException noRegionAccess()
      Creates a denied-access failure.
      Gibt zurück:
      localized failure for denied region access
    • notRegionOwner

      public static ApplicationException notRegionOwner()
      Creates a denied-ownership failure.
      Gibt zurück:
      localized failure for a player who does not own the region
    • notRenter

      public static ApplicationException notRenter()
      Creates a denied-renter failure.
      Gibt zurück:
      localized failure for a player who is not the current renter
    • messageKey

      public String messageKey()
      Beschreibung aus Schnittstelle kopiert: LocalizedFailure
      Returns the YAML message key.
      Angegeben von:
      messageKey in Schnittstelle LocalizedFailure
      Gibt zurück:
      configured message path
    • fallbackMessage

      public String fallbackMessage()
      Beschreibung aus Schnittstelle kopiert: LocalizedFailure
      Returns the fallback template.
      Angegeben von:
      fallbackMessage in Schnittstelle LocalizedFailure
      Gibt zurück:
      fallback message
    • messagePlaceholders

      public Map<String,?> messagePlaceholders()
      Beschreibung aus Schnittstelle kopiert: LocalizedFailure
      Returns untrusted dynamic values that must be inserted without parsing.
      Angegeben von:
      messagePlaceholders in Schnittstelle LocalizedFailure
      Gibt zurück:
      immutable placeholder map