Skip to content

Commit

Permalink
Fixed openGUI not copying variables from parent GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
fulminazzo committed Apr 13, 2024
1 parent 5173f74 commit 4e84c41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gui/bukkit/src/main/java/it/angrybear/yagl/GUIAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ public static <M extends ItemMeta> void openGUI(final @NotNull GUI gui, @NotNull
for (int i = 0; i < gui.size(); i++) {
GUIContent content = gui.getContent(viewer, i);
if (content != null) {
ItemStack o = content.render().copy(BukkitItem.class).create(itemMetaClass, metaFunction);
ItemStack o = content.copy().copyFrom(gui, false)
.render()
.copy(BukkitItem.class)
.create(itemMetaClass, metaFunction);
inventory.setItem(i, o);
}
}
Expand Down

0 comments on commit 4e84c41

Please sign in to comment.