File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/gg/essential/ad Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -68,17 +68,22 @@ public class EssentialAd {
6868 //#endif
6969 ));
7070
71- private final CompletableFuture <AdData > adDataFuture = EssentialAPI . fetchAdData () ;
71+ private CompletableFuture <AdData > adDataFuture = null ;
7272 private List <AdData .PartnerMod > partnerMods = null ;
7373
7474 public EssentialAd () {
75+ if (EssentialUtil .isEssentialOrContainerLoaded ()) return ;
76+ if (CONFIG .shouldHideButtons ()) return ;
77+
7578 //#if FORGE
7679 MinecraftForge .EVENT_BUS .register (this );
7780 MinecraftForge .EVENT_BUS .register (ModalManager .INSTANCE );
7881 //#else
7982 //$$ ScreenEvents.AFTER_INIT.register(this::afterScreenInit);
8083 //$$ ModalManager.INSTANCE.registerEvents();
8184 //#endif
85+
86+ adDataFuture = EssentialAPI .fetchAdData ();
8287 }
8388
8489 private void createButton (
You can’t perform that action at this time.
0 commit comments