Skip to content

Commit

Permalink
fix: teleports fail after respawn on Fabric, close #714
Browse files Browse the repository at this point in the history
  • Loading branch information
WiIIiam278 committed Nov 8, 2024
1 parent 9d17faf commit 80ef674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80ef674

Please sign in to comment.