Skip to content

Evaluation Utils

WolfyScript edited this page Jun 14, 2022 · 2 revisions

The evaluation utils are a relatively new addition to WolfyUtils. They allow you to specify an evaluation context, which can then be used to evalute it using JSON specified operators and value providers.

EvalContext

The evaluation context contains all the possible variables and other references, that can be used by the value providers and operators.
For example, the EvalContextPlayer contains the player that belongs to the context and can be used in value providers that require a player like the ValueProviderPAPI.

Operators

The Operators compare two values and return another value. At the moment, there are only operators that extend the BoolOperator, and return a boolean value.
They are separated into two groups. Comparison and Logical Operators.

Comparison Operators

Those operators compare two values and return a boolean value. Both values must be of the same type!

  • wolfyutilities:equal
  • wolfyutilities:greater
  • wolfyutilities:greater_equal
  • wolfyutilities:less
  • wolfyutilities:less_equal
  • wolfyutilities:not_equal

Logical Operators

These operators take in one or more boolean values and return another boolean value.

  • wolfyutilities:and
  • wolfyutilities:not
  • wolfyutilities:or

Value Providers

Value providers provide specific values, that can be specified via JSON.

//TODO

| Home

| GUIs

| NBT Tools

Clone this wiki locally