aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/misc/PleaseUseSkyguide.java34
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;
+ }
+}