From 8d0b0ae4ec991905b2efad4c6fa631bdc1c0f307 Mon Sep 17 00:00:00 2001 From: matsu1213 Date: Sat, 27 Jul 2024 22:51:20 +0900 Subject: [PATCH] fix rejoin --- .../azisaba/lgw/core/listeners/PlayerControlListener.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/azisaba/lgw/core/listeners/PlayerControlListener.java b/src/main/java/net/azisaba/lgw/core/listeners/PlayerControlListener.java index c535d864..fca6ac1d 100644 --- a/src/main/java/net/azisaba/lgw/core/listeners/PlayerControlListener.java +++ b/src/main/java/net/azisaba/lgw/core/listeners/PlayerControlListener.java @@ -110,7 +110,13 @@ public void sendQuickMessage(PlayerJoinEvent e) { //LeonGunWar.getQuickBar().send(e.getPlayer()); if(!LeonGunWar.getPlugin().getMainConfig().isLobby){ if(LeonGunWar.getPlugin().getManager().isMatching()){ - LeonGunWar.getPlugin().getManager().addPlayerIntoBattle(e.getPlayer()); + Bukkit.getScheduler().runTaskLater(LeonGunWar.getPlugin(), new Runnable() { + @Override + public void run() { + LeonGunWar.getPlugin().getManager().addPlayerIntoBattle(e.getPlayer()); + } + }, 5L); + }else { LeonGunWar.getPlugin().getManager().addEntryPlayer(e.getPlayer()); }