Annotation Type Conditional


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Conditional
    Method Annotation to determine that a method can not be called unless a condition is fulfilled.

    Condition information is provided with BooleanProvider. If BooleanProvider for the condition is not specified the method tagged with this annotation will not be called, (Condition is assumed false).

    Please note that Conditional does not cross method parameter boundaries - (Conditional on a player method does not take into account conditionals of server).

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value
      Name of the condition limited to 50 characters.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean negated
      Reverse the condition.
    • Element Detail

      • value

        java.lang.String value
        Name of the condition limited to 50 characters.
        Returns:
        Case sensitive string of max 50 characters.
      • negated

        boolean negated
        Reverse the condition.

        Example: - Method with Conditional("expires", negated = true) will only be called when the condition "expires" is false.

        Returns:
        false by default.
        Default:
        false