no more messing up splits with practise server

This commit is contained in:
Stachelbeere1248 2024-02-13 22:03:30 +01:00
parent f4d48bfdf1
commit 20d9cf6ac7
Signed by: Stachelbeere1248
SSH key fingerprint: SHA256:IozEKdw2dB8TZxkpPdMxcWSoWTIMwoLaCcZJ1AJnY2o
3 changed files with 7 additions and 2 deletions

View file

@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx2g
baseGroup = com.github.stachelbeere1248.zombiesutils
mcVersion = 1.8.9
modid = zombiesutils
version = 1.2.4-PREVIEW_1
version = 1.2.4-PREVIEW_5

View file

@ -4,6 +4,8 @@ import com.github.stachelbeere1248.zombiesutils.commands.CommandRegistry;
import com.github.stachelbeere1248.zombiesutils.config.Hotkeys;
import com.github.stachelbeere1248.zombiesutils.config.ZombiesUtilsConfig;
import com.github.stachelbeere1248.zombiesutils.handlers.HandlerRegistry;
import net.minecraft.client.Minecraft;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
@ -50,4 +52,7 @@ public class ZombiesUtils {
public Hotkeys getHotkeys() {
return hotkeys;
}
public static boolean isHypixel() {
return Minecraft.getMinecraft().getCurrentServerData().serverIP.matches(".*(hypixel\\.net)(:25565)?");
}
}

View file

@ -76,7 +76,7 @@ public class Timer {
}
try {
record(passedRound, roundTime, gameTime);
if (!ZombiesUtils.isHypixel()) record(passedRound, roundTime, gameTime);
} catch (Exception e) {
ZombiesUtils.getInstance().getLogger().error(ExceptionUtils.getStackTrace(e));
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText("Error saving splits"));