diff options
author | hackthetime <l4bg0jb7@duck.com> | 2023-11-08 10:35:08 +0100 |
---|---|---|
committer | hackthetime <l4bg0jb7@duck.com> | 2023-11-08 10:35:08 +0100 |
commit | c41eb7f730e7586a69dce21691083f4637c0e595 (patch) | |
tree | 45564770e7140e10be8f96c74850dbea06a3c3c5 /forge | |
parent | 208ee28028e4a772a573a75f2aef6780304b3f53 (diff) | |
download | BBsentials-c41eb7f730e7586a69dce21691083f4637c0e595.tar.gz BBsentials-c41eb7f730e7586a69dce21691083f4637c0e595.tar.bz2 BBsentials-c41eb7f730e7586a69dce21691083f4637c0e595.zip |
found a solution to solve the bug that crashed the mod when initialising the config at startup. No automatically loads the config at start by using a different source for the username. getUsername did not change.
Diffstat (limited to 'forge')
-rw-r--r-- | forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java | 1 | ||||
-rw-r--r-- | forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java b/forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java index 4e60e69..1202036 100644 --- a/forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java +++ b/forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java @@ -21,6 +21,7 @@ public class ExampleMod { public void init(FMLInitializationEvent event) { printLocation(); EnvironmentCore core = new EnvironmentCore(new BBUtils(), new ForgeChat(), new MCUtils(), new Commands(), new Options(), new DebugThread()); + BBsentials.init(); MinecraftForge.EVENT_BUS.register(this); } public void printLocation() { diff --git a/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java b/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java index 424eded..50c7c90 100644 --- a/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java +++ b/forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java @@ -22,7 +22,7 @@ public class MCUtils implements de.hype.bbsentials.common.mclibraries.MCUtils { } public String getUsername() { - return Minecraft.getMinecraft().thePlayer.getName(); + return Minecraft.getMinecraft().getSession().getUsername(); } public String getMCUUID() { |