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,9 +27,11 @@ public class PlayerJoinQuitListener implements Listener {
@EventHandler @EventHandler
public void onPlayerQuit(final PlayerQuitEvent e) { public void onPlayerQuit(final PlayerQuitEvent e) {
e.setQuitMessage(null); e.setQuitMessage(null);
this.plugin.getNPCManager().createClone(e.getPlayer(), true); if (!this.plugin.getBanUtils().isBanned(e.getPlayer().getUniqueId())) {
Bukkit.broadcast( this.plugin.getNPCManager().createClone(e.getPlayer(), true);
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true)); Bukkit.broadcast(
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true));
}
} }
@EventHandler @EventHandler