From f4ec493e7f5018e2f8059bfae4f15b5ea9324d42 Mon Sep 17 00:00:00 2001 From: virustotalop Date: Wed, 28 Aug 2024 22:04:45 -0700 Subject: [PATCH] Add override for copy back metadata function --- .../core/function/meta/CopyBackMetadataFunction.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/clubobsidian/dynamicgui/core/function/meta/CopyBackMetadataFunction.java b/core/src/main/java/com/clubobsidian/dynamicgui/core/function/meta/CopyBackMetadataFunction.java index a9d4f40b7..45ae8ea41 100644 --- a/core/src/main/java/com/clubobsidian/dynamicgui/core/function/meta/CopyBackMetadataFunction.java +++ b/core/src/main/java/com/clubobsidian/dynamicgui/core/function/meta/CopyBackMetadataFunction.java @@ -33,6 +33,7 @@ public CopyBackMetadataFunction() { @Override public boolean function(PlayerWrapper playerWrapper) { Gui gui = null; + String data = this.getData(); FunctionOwner owner = this.getOwner(); if (owner instanceof Slot) { Slot slot = (Slot) owner; @@ -41,10 +42,13 @@ public boolean function(PlayerWrapper playerWrapper) { gui = (Gui) owner; } + boolean override = Boolean.parseBoolean(data); + Gui back = gui.getBack(); if (back == null) { - return false; + return override; } + gui.getMetadata().putAll(back.getMetadata()); return true; }