Class AttributeRangeError<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Constructor Detail

      • AttributeRangeError

        public AttributeRangeError​(@NotNull
                                   G gameObject,
                                   @NotNull
                                   @NotNull java.lang.String attributeName,
                                   @NotNull
                                   @NotNull java.lang.String curValue,
                                   @NotNull
                                   @NotNull java.lang.String minValue,
                                   @NotNull
                                   @NotNull java.lang.String maxValue)
        Creates a new instance.
        Parameters:
        gameObject - the game object having an out of range value
        attributeName - the suspicious attribute name
        curValue - the current (incorrect) attribute value
        minValue - the minimal allowed attribute value
        maxValue - the maximal allowed attribute value
    • Method Detail

      • getParameter

        @Nullable
        public @Nullable java.lang.String getParameter​(int id)
        Description copied from class: ValidationError
        Returns a parameter string to be used in the error message. It can be accessed with {4+id}.
        Specified by:
        getParameter in class ValidationError<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
        Parameters:
        id - the error id
        Returns:
        the error string