aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-08-10 13:33:52 +0200
committerGitHub <noreply@github.com>2022-08-10 13:33:52 +0200
commit67a78a550c9d87715b834b4615662cc2d9e65bed (patch)
tree00682ca3af62de86fef29e9d28aadd24dfbc03f2 /src
parent97a75485fa125b37c27ffd53ac1c4fbc875a7b40 (diff)
downloadOneConfig-67a78a550c9d87715b834b4615662cc2d9e65bed.tar.gz
OneConfig-67a78a550c9d87715b834b4615662cc2d9e65bed.tar.bz2
OneConfig-67a78a550c9d87715b834b4615662cc2d9e65bed.zip
hud profile fix (#90)
* hud fix * api
Diffstat (limited to 'src')
-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);