From 78e043c8b8a8613b53fca3b427501d0b20f21536 Mon Sep 17 00:00:00 2001 From: Jules Date: Thu, 24 Jun 2021 19:33:59 +0200 Subject: [PATCH] Fix MMOInventory comp --- src/main/java/net/Indyuce/mmoitems/MMOItems.java | 13 +++++++++++++ .../mmoitems/api/util/NumericStatFormula.java | 2 ++ 2 files changed, 15 insertions(+) diff --git a/src/main/java/net/Indyuce/mmoitems/MMOItems.java b/src/main/java/net/Indyuce/mmoitems/MMOItems.java index a629c1c2..0ca13c99 100644 --- a/src/main/java/net/Indyuce/mmoitems/MMOItems.java +++ b/src/main/java/net/Indyuce/mmoitems/MMOItems.java @@ -402,6 +402,19 @@ public class MMOItems extends LuminePlugin { return inventory; } + /** + * The PlayerInventory interface lets MMOItems knows what items to look for + * in player inventories whe doing inventory updates. By default, it only + * checks held items + armor slots. However other plugins like MMOInv do + * implement custom slots and therefore must register a custom + * PlayerInventory instance that tells of additional items to look for. + */ + public void registerPlayerInventory(PlayerInventory value) { + + // Registers in the Inventory Handler + getInventory().register(value); + } + /** * The PlayerInventory interface lets MMOItems knows what items to look for * in player inventories whe doing inventory updates. By default, it only diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java b/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java index 0fe6c64e..7b73c7c4 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/NumericStatFormula.java @@ -19,6 +19,8 @@ import org.jetbrains.annotations.Nullable; /** * That Gaussian spread distribution thing that no one understands. + * + * @author indyuce */ public class NumericStatFormula implements RandomStatData, UpdatableRandomStatData { private final double base, scale, spread, maxSpread;