From d4431e7569a28afd5032348623fa7f9db74d8f26 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 20 Aug 2021 23:02:45 +0100 Subject: [PATCH] Changes --- eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java | 1 + .../src/main/kotlin/com/willfp/eco/internal/gui/menu/EcoMenu.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java b/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java index 96487b59..68bdc1f8 100644 --- a/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java +++ b/eco-api/src/main/java/com/willfp/eco/core/gui/menu/Menu.java @@ -82,6 +82,7 @@ public interface Menu { * @param type The type. * @param The type. * @param The type. + * @return The data. */ @Nullable T readData(@NotNull Player player, @NotNull NamespacedKey key, diff --git a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/menu/EcoMenu.kt b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/menu/EcoMenu.kt index 6c8edbc0..4089b611 100644 --- a/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/menu/EcoMenu.kt +++ b/eco-core/core-backend/src/main/kotlin/com/willfp/eco/internal/gui/menu/EcoMenu.kt @@ -88,6 +88,7 @@ class EcoMenu( val inventory = MenuHandler.getExtendedInventory(player.openInventory.topInventory) inventory ?: return inventory.data[key] = value + inventory.refresh(player) } override fun readData(player: Player, key: NamespacedKey, type: PersistentDataType): T? {