Skip to content

Conversation

@tastybento
Copy link
Member

Evaluates the given formula by first replacing PAPI placeholders using the provided Player, then parsing and evaluating one or more conditions. The formula may contain conditions comparing numeric or string values. Operands may contain spaces.

Supported comparison operators (case sensitive) are:

  • "=" or "==" for equality
  • "<>" or "!=" for inequality
  • "<=" and ">=" for less than or equal and greater than or equal
  • "<" and ">" for less than and greater than

For strings:

  • "=" for case insensitive equality
  • "==" for case-sensitive equality
  • "<>" for case-insensitive inequality
  • "!=" for case sensitive inequality

Boolean connectors "AND" and "OR" (case insensitive) combine multiple conditions; AND has higher precedence than OR.

Examples:

%aoneblock_my_island_lifetime_count% >= 1000 AND %aoneblock_my_island_level% >= 100
john smith == tasty bento AND 40 > 20

@sonarqubecloud
Copy link

@tastybento tastybento merged commit 362d846 into develop Feb 14, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants