diff options
author | Erymanthus[#5074] | (u/)RayDeeUx <51521765+RayDeeUx@users.noreply.github.com> | 2022-11-05 10:33:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 10:33:09 -0400 |
commit | 84cd841de2396ab6a25842d9c9a5c25610f7536b (patch) | |
tree | c88bc92d75cd16b6b1c1d70ee352d4e7c4ce9a8a /src/main | |
parent | 9e87d9df2363929b9dc85a3e45c4899740e10af5 (diff) | |
download | SkyblockHud-Death-Defied-84cd841de2396ab6a25842d9c9a5c25610f7536b.tar.gz SkyblockHud-Death-Defied-84cd841de2396ab6a25842d9c9a5c25610f7536b.tar.bz2 SkyblockHud-Death-Defied-84cd841de2396ab6a25842d9c9a5c25610f7536b.zip |
Please use SkyGuide.
Signed-off-by: Erymanthus[#5074] | (u/)RayDeeUx <51521765+RayDeeUx@users.noreply.github.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/misc/PleaseUseSkyguide.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/misc/PleaseUseSkyguide.java b/src/main/java/com/thatgravyboat/skyblockhud/misc/PleaseUseSkyguide.java new file mode 100644 index 0000000..683c534 --- /dev/null +++ b/src/main/java/com/thatgravyboat/skyblockhud/misc/PleaseUseSkyguide.java @@ -0,0 +1,34 @@ +package com.thatgravyboat.skyblockhud.misc; + +import net.minecraft.client.Minecraft; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; + +import net.minecraftforge.fml.common.Loader; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import net.minecraftforge.fml.common.gameevent.TickEvent; + + +/*********************** + * PleaseUseSkyguide + * + * A Java class written by Erymanthus / RayDeeUx + * and DeDiamondPro as a means to minimize instances + * of enabling SBHud's minimap with SkyGuide installed. + * + * God, would this shit even work? +***********************/ + +public class PleaseUseSkyguide { + private boolean hasSentWarningForSession = false; + + @SubscribeEvent + public void sendWarning(TickEvent.ClientTickEvent event){ + if (Minecraft.getMinecraft().thePlayer == null || !SkyblockHud.config.Map.showMiniMap || !Loader.isModLoaded("skyguide")) return; + SkyblockHud.config.Map.showMiniMap = false; + if (hasSentWarningForSession) return; + Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "[SBH] SkyGuide by DeDiamondPro has been detected. As a result, SBHud's minimap has been disabled. Please use SkyGuide instead.")); + //prevent sending warning more than once per session + hasSentWarningForSession = true; + } +} |