fix: don't spawn FakePlayer if player was killed
This commit is contained in:
parent
871970f541
commit
a8e064d4dc
1 changed files with 5 additions and 3 deletions
|
@ -27,9 +27,11 @@ public class PlayerJoinQuitListener implements Listener {
|
|||
@EventHandler
|
||||
public void onPlayerQuit(final PlayerQuitEvent e) {
|
||||
e.setQuitMessage(null);
|
||||
this.plugin.getNPCManager().createClone(e.getPlayer(), true);
|
||||
Bukkit.broadcast(
|
||||
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true));
|
||||
if (!this.plugin.getBanUtils().isBanned(e.getPlayer().getUniqueId())) {
|
||||
this.plugin.getNPCManager().createClone(e.getPlayer(), true);
|
||||
Bukkit.broadcast(
|
||||
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
Loading…
Reference in a new issue