aboutsummaryrefslogtreecommitdiff
path: root/forge/src/main/java
diff options
context:
space:
mode:
authorhackthetime <l4bg0jb7@duck.com>2023-11-08 10:35:08 +0100
committerhackthetime <l4bg0jb7@duck.com>2023-11-08 10:35:08 +0100
commitc41eb7f730e7586a69dce21691083f4637c0e595 (patch)
tree45564770e7140e10be8f96c74850dbea06a3c3c5 /forge/src/main/java
parent208ee28028e4a772a573a75f2aef6780304b3f53 (diff)
downloadBBsentials-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/src/main/java')
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/ExampleMod.java1
-rw-r--r--forge/src/main/java/de/hype/bbsentials/forge/MCUtils.java2
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() {