diff options
Diffstat (limited to 'fabric')
-rw-r--r-- | fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java | 2 | ||||
-rw-r--r-- | fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java b/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java index a0f04d2..4fea7fd 100644 --- a/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java +++ b/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java @@ -22,7 +22,7 @@ public class MCUtils implements de.hype.bbsentials.common.mclibraries.MCUtils { } public String getUsername() { - return MinecraftClient.getInstance().player.getName().getString(); + return MinecraftClient.getInstance().getSession().getUsername(); } public String getMCUUID() { diff --git a/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java b/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java index c94202b..3d3b42c 100644 --- a/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java +++ b/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java @@ -229,6 +229,7 @@ public class ModInitialiser implements ClientModInitializer { public void onInitializeClient() { EnvironmentCore core = new EnvironmentCore(new BBUtils(), new FabricChat(), new MCUtils(), new Commands(), new Options(), new DebugThread()); codes = new NumPadCodes(); + BBsentials.init(); ClientPlayConnectionEvents.JOIN.register((a, b, c) -> { BBsentials.onServerSwap(); }); |