Skip to content

Commit

Permalink
fix versions before 1.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gibsonpil committed Jul 20, 2024
1 parent 526e674 commit c88c178
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ void onPlayerRespawn(final PlayerRespawnEvent event) {
(!VersionUtil.getServerBukkitVersion().isHigherThanOrEqualTo(VersionUtil.v1_16_1_R01) ||
(!event.isAnchorSpawn() || ess.getSettings().isRespawnAtAnchor()))) {
// cannot nuke this sync load due to the event being sync so it would hand either way
respawnLocation = user.getBase().getRespawnLocation();
try {
respawnLocation = user.getBase().getRespawnLocation();
} catch (NoSuchMethodError e) { // For versions prior to 1.16.
respawnLocation = user.getBase().getBedSpawnLocation();
}
}

if (respawnLocation != null) {
Expand Down

0 comments on commit c88c178

Please sign in to comment.