fix: don't spawn FakePlayer if player was killed

This commit is contained in:
Simon Giesel 2020-05-09 16:45:20 +02:00
parent 871970f541
commit a8e064d4dc

View file

@ -27,10 +27,12 @@ public class PlayerJoinQuitListener implements Listener {
@EventHandler
public void onPlayerQuit(final PlayerQuitEvent e) {
e.setQuitMessage(null);
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
public void onPlayerJoin(final PlayerJoinEvent e) {