aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/hud/Hud.java7
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/Hud.java b/src/main/java/cc/polyfrost/oneconfig/hud/Hud.java
index 12fd5bb..2440bfc 100644
--- a/src/main/java/cc/polyfrost/oneconfig/hud/Hud.java
+++ b/src/main/java/cc/polyfrost/oneconfig/hud/Hud.java
@@ -167,6 +167,13 @@ public abstract class Hud {
}
/**
+ * @return The config of this HUD
+ */
+ public Config getConfig() {
+ return this.config;
+ }
+
+ /**
* @return The scale of the Hud
*/
public float getScale() {
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java b/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java
index d78df55..f557c8d 100644
--- a/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java
+++ b/src/main/java/cc/polyfrost/oneconfig/internal/hud/HudCore.java
@@ -56,6 +56,7 @@ public class HudCore {
field.getKey().setAccessible(true);
Hud oldHud = huds.get(field);
Hud newHud = (Hud) field.getKey().get(field.getValue());
+ newHud.setConfig(oldHud.getConfig());
for (BasicOption option : hudOptions) {
if (option.getParent().equals(oldHud)) {
option.setParent(newHud);