diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-05-07 13:52:48 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-05-07 13:52:48 +0200 |
commit | 8ab9d2e46a5e3386744d1a31478846107dc356f5 (patch) | |
tree | 9679acbe8f57f3e30abe6a0e2c5e068c4c21c92c /src/main/java/re | |
parent | 48fe4fcd7ed75a08bb5ba4bef1114150b15adf85 (diff) | |
download | parquet-8ab9d2e46a5e3386744d1a31478846107dc356f5.tar.gz |
Added logger instead of stdout
Diffstat (limited to 'src/main/java/re')
-rw-r--r-- | src/main/java/re/jag/parquet/Parquet.java | 11 | ||||
-rw-r--r-- | src/main/java/re/jag/parquet/commands/Savedata.java | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/re/jag/parquet/Parquet.java b/src/main/java/re/jag/parquet/Parquet.java index dd63220..05d3c93 100644 --- a/src/main/java/re/jag/parquet/Parquet.java +++ b/src/main/java/re/jag/parquet/Parquet.java @@ -1,5 +1,8 @@ package re.jag.parquet; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + import com.mojang.brigadier.CommandDispatcher; import net.fabricmc.api.ModInitializer; @@ -14,7 +17,8 @@ import re.jag.parquet.commands.CameraMode; import re.jag.parquet.commands.Savedata; public class Parquet implements ModInitializer { - + public static final Logger LOG = LogManager.getLogger(); + @Override public void onInitialize() { @@ -23,7 +27,8 @@ public class Parquet implements ModInitializer { public static void registerCommands(CommandDispatcher<ServerCommandSource> dispatcher) { Savedata.register(dispatcher); CameraMode.register(dispatcher); - System.out.println("[parquet] Registered commands"); + + LOG.info("[PQ] Registered commands"); } public static void registerCustomDispenserBehavior() { @@ -44,7 +49,7 @@ public class Parquet implements ModInitializer { DispenserBlock.registerBehavior(Items.GLASS_BOTTLE, new GlassBottleDispenserBehavior()); DispenserBlock.registerBehavior(Items.POTION, new PotionDispenserBehavior()); - System.out.println("Registered Custom Dispenser behaviors"); + LOG.info("[PQ] Registered Custom Dispenser behaviors"); } } diff --git a/src/main/java/re/jag/parquet/commands/Savedata.java b/src/main/java/re/jag/parquet/commands/Savedata.java index f4223f9..86ecf9d 100644 --- a/src/main/java/re/jag/parquet/commands/Savedata.java +++ b/src/main/java/re/jag/parquet/commands/Savedata.java @@ -27,6 +27,7 @@ import net.minecraft.text.LiteralText; import net.minecraft.util.Identifier; import net.minecraft.util.registry.Registry; import net.minecraft.world.dimension.DimensionType; +import re.jag.parquet.Parquet; import net.minecraft.stat.ServerStatHandler; import net.minecraft.stat.Stat; import net.minecraft.stat.StatType; @@ -117,6 +118,7 @@ public class Savedata { GameProfile profile = source.getMinecraftServer().getUserCache().findByName(player_name); if (profile == null) { + Parquet.LOG.debug("Savedata: User not in Usercache"); return null; } @@ -126,6 +128,7 @@ public class Savedata { File file2 = new File(file, player_uuid + ".json"); if (!file2.exists()) { + Parquet.LOG.debug("Savedata: user stat file not found"); return null; } |