diff options
author | Linnea Gräf <nea@nea.moe> | 2024-07-12 21:41:17 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-07-12 21:41:17 +0200 |
commit | 57b953538dcd2d33f6ce9fb615587e321debc238 (patch) | |
tree | 5f5b216b824c2b8428a5146ead8280301879c059 /src | |
parent | ebbe3df91ffc7194cd533b409db8b125aa09b686 (diff) | |
parent | 2a556a687a4fbd9298daa6fa00d0b18de6315038 (diff) | |
download | HyPixelForgeModAPI-57b953538dcd2d33f6ce9fb615587e321debc238.tar.gz HyPixelForgeModAPI-57b953538dcd2d33f6ce9fb615587e321debc238.tar.bz2 HyPixelForgeModAPI-57b953538dcd2d33f6ce9fb615587e321debc238.zip |
Merge commit 'refs/pull/6/head' of github.com:HypixelDev/ForgeModAPI into feat/tweaker
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java b/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java index c7c31c2..282408c 100644 --- a/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java +++ b/src/main/java/net/hypixel/modapi/forge/ForgeModAPI.java @@ -20,14 +20,14 @@ import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.network.FMLNetworkEvent; -import java.util.logging.Level; -import java.util.logging.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; @Mod(modid = ForgeModAPI.MODID, version = ForgeModAPI.VERSION, clientSideOnly = true, name = "Hypixel Mod API") public class ForgeModAPI { public static final String MODID = "hypixel_mod_api"; - public static final String VERSION = "1.0.0.1"; - private static final Logger LOGGER = Logger.getLogger("HypixelModAPI"); + public static final String VERSION = "${version}"; + private static final Logger LOGGER = LogManager.getLogger("HypixelModAPI"); // We store a local reference to the net handler, so it's instantly available from the moment we connect private NetHandlerPlayClient netHandler; @@ -55,7 +55,7 @@ public class ForgeModAPI { } if (!netHandler.getNetworkManager().isChannelOpen()) { - LOGGER.warning("Attempted to send packet while channel is closed!"); + LOGGER.warn("Attempted to send packet while channel is closed!"); netHandler = null; return false; } @@ -91,7 +91,7 @@ public class ForgeModAPI { try { HypixelModAPI.getInstance().handle(identifier, new PacketSerializer(buffer)); } catch (Exception e) { - LOGGER.log(Level.WARNING, "Failed to handle packet " + identifier, e); + LOGGER.warn("Failed to handle packet {}", identifier, e); } finally { buffer.release(); } |