diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-08-10 10:15:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-10 17:15:01 +0900 |
commit | 091ce4c72c123f43f317c097818ace15f3a085fa (patch) | |
tree | 9a151e29494ef2683b2bff59fec19b56d4a05fb0 /src/main/java/cc/polyfrost/oneconfig/gui | |
parent | 799c389fdb993e363d71d268e0df9ae9f0a0c8a1 (diff) | |
download | OneConfig-091ce4c72c123f43f317c097818ace15f3a085fa.tar.gz OneConfig-091ce4c72c123f43f317c097818ace15f3a085fa.tar.bz2 OneConfig-091ce4c72c123f43f317c097818ace15f3a085fa.zip |
Profile command (#88)
* e
* omg finish profile shit
* api and fix 1.12.2 preprocess
* fix class names
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java index 429de09..dd802b5 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java @@ -58,7 +58,6 @@ import java.util.ArrayList; public class OneConfigGui extends UScreen implements GuiPause { public static OneConfigGui INSTANCE; - public static OneConfigGui instanceToRestore = null; private final SideBar sideBar = new SideBar(); private final TextInputField textInputField = new TextInputField(248, 40, "Search...", false, false, SVGs.MAGNIFYING_GLASS_BOLD); private final ArrayList<Page> previousPages = new ArrayList<>(); @@ -75,21 +74,15 @@ public class OneConfigGui extends UScreen implements GuiPause { public OneConfigGui() { INSTANCE = this; - instanceToRestore = null; } public OneConfigGui(Page page) { INSTANCE = this; - instanceToRestore = null; currentPage = page; } public static OneConfigGui create() { - try { - return instanceToRestore == null ? new OneConfigGui() : instanceToRestore; - } finally { - if (instanceToRestore != null) INSTANCE = instanceToRestore; - } + return INSTANCE == null ? new OneConfigGui() : INSTANCE; } @Override @@ -303,8 +296,6 @@ public class OneConfigGui extends UScreen implements GuiPause { @Override public void onScreenClose() { currentPage.finishUpAndClose(); - instanceToRestore = this; - INSTANCE = null; super.onScreenClose(); } |