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? {