Skip to content

Commit

Permalink
fix respawn error
Browse files Browse the repository at this point in the history
  • Loading branch information
matsu1213 committed Jul 28, 2024
1 parent 577168d commit 60ade8d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ public class AutoRespawnListener implements Listener {
public void onDeath(PlayerDeathEvent e) {
Player deader = e.getEntity();

// リスポーン
deader.spigot().respawn();
Bukkit.getScheduler().runTask(LeonGunWar.getPlugin(), new Runnable() {
@Override
public void run() {
// リスポーン
deader.spigot().respawn();
}
});
}

@EventHandler(priority = EventPriority.MONITOR)
Expand Down

0 comments on commit 60ade8d

Please sign in to comment.