diff --git a/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java b/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java index 9431878e..8a41a741 100644 --- a/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java +++ b/fabric/src/main/java/net/william278/huskhomes/listener/FabricEventListener.java @@ -54,15 +54,16 @@ public void register() { }); // Respawn event - ServerPlayerEvents.AFTER_RESPAWN.register((oldPlayer, newPlayer, alive) -> handlePlayerRespawn( - getPlugin().getOnlineUser(newPlayer) - )); + ServerPlayerEvents.AFTER_RESPAWN.register((oldPlayer, newPlayer, alive) -> { + getPlugin().getOnlineUserMap().remove(oldPlayer.getUuid()); + handlePlayerRespawn(getPlugin().getOnlineUser(newPlayer)); + }); } - + @NotNull @Override protected FabricHuskHomes getPlugin() { return (FabricHuskHomes) super.getPlugin(); } - + } diff --git a/gradle.properties b/gradle.properties index 4c67de1f..04878c16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ fabric_loom_version=1.8-SNAPSHOT fabric_minecraft_version=1.21.3 fabric_loader_version=0.16.9 fabric_yarn_mappings=1.21.3+build.2 -fabric_api_version=0.107.0+1.21.3 +fabric_api_version=0.107.3+1.21.3 fabric_permissions_api_version=0.3.2 adventure_platform_fabric_version=6.1.0-SNAPSHOT fabric_impactor_api_version=5.2.4-SNAPSHOT