aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
diff options
context:
space:
mode:
authorCraftyOldMiner <85420839+CraftyOldMiner@users.noreply.github.com>2022-03-24 14:55:20 -0500
committerGitHub <noreply@github.com>2022-03-24 19:55:20 +0000
commite202e4adf979073921455083f5e737bc4fcf5f14 (patch)
tree5e1653b8696168294f2b3456d532e88d4a73fc73 /src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
parent7d923e6675dc681261e3cbd5fb0c81263209dbc6 (diff)
downloadnotenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.tar.gz
notenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.tar.bz2
notenoughupdates-e202e4adf979073921455083f5e737bc4fcf5f14.zip
Refactor Hollows solvers, add tests, add Vec3Comparable, fix bugs (#95)
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
index 5b7bd055..a557eb12 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/SBInfo.java
@@ -18,6 +18,8 @@ import net.minecraft.scoreboard.Score;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.ScorePlayerTeam;
import net.minecraft.scoreboard.Scoreboard;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.GuiOpenEvent;
@@ -57,7 +59,7 @@ public class SBInfo {
public String slayer = "";
public boolean stranded = false;
- public String mode = "";
+ public String mode = null;
public Date currentTimeDate = null;
@@ -120,6 +122,16 @@ public class SBInfo {
}
}
+ public boolean checkForSkyblockLocation() {
+ if (!NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard() || getLocation() == null) {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED +
+ "[NEU] This command is not available outside SkyBlock"));
+ return false;
+ }
+
+ return true;
+ }
+
private static final Pattern PROFILE_PATTERN =
Pattern.compile("(?<type>(♲ Ironman)|(☀ Stranded)|()) *Profile: (?<name>[^ ]+)");