From a8e064d4dcaa89a0087d1356682aa9c4024a485f Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 9 May 2020 16:45:20 +0200 Subject: [PATCH] fix: don't spawn FakePlayer if player was killed --- .../cliffbreak/varo/listeners/PlayerJoinQuitListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java index 89c7e4c..93268be 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/PlayerJoinQuitListener.java @@ -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