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,10 +27,12 @@ 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);
|
||||||
|
if (!this.plugin.getBanUtils().isBanned(e.getPlayer().getUniqueId())) {
|
||||||
this.plugin.getNPCManager().createClone(e.getPlayer(), true);
|
this.plugin.getNPCManager().createClone(e.getPlayer(), true);
|
||||||
Bukkit.broadcast(
|
Bukkit.broadcast(
|
||||||
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true));
|
MessageUtils.getRichTextComponent(e.getPlayer().getName(), "§f hat den Server verlassen.", true));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(final PlayerJoinEvent e) {
|
public void onPlayerJoin(final PlayerJoinEvent e) {
|
||||||
|
|
Loading…
Reference in a new issue