From 1d573736593020bfd6f5acb4b2d28d78243e7eaa Mon Sep 17 00:00:00 2001 From: garbagemule Date: Sun, 7 May 2023 11:49:33 +0200 Subject: [PATCH] Updated Formulas (markdown) --- Formulas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formulas.md b/Formulas.md index 48a7c15..7bbbe54 100644 --- a/Formulas.md +++ b/Formulas.md @@ -136,7 +136,7 @@ formulas.registerVariable("exploding-sheep", arena -> { formulas.registerBinaryOperator("@", 2, true, (a, b) -> b - a); // Register `up` as a new unary function that adds 1 to its input. -formulas.registerUnaryFunction("square", v -> v + 1); +formulas.registerUnaryFunction("up", v -> v + 1); ``` Note that extensions must be registered _before_ MobArena's `onEnable()` runs for the registrations to take effect. The FormulaManager is available after MobArena's `onLoad()` has executed. This means that plugins extending MobArena's Formula system should have `loadbefore: [MobArena]` in their `plugin.yml` file, and they should register extensions during their own `onEnable()` method.