Fixed onPlayerLeaveEvent on kick

This commit is contained in:
AlessioDP 2019-10-09 02:31:35 +02:00
parent 20f1d2845b
commit 2e2c849be4
No known key found for this signature in database
GPG Key ID: B92B813840FFCC9F

View File

@ -63,7 +63,7 @@ public class PartiesListener implements Listener {
@EventHandler
public void onPlayerLeaveEvent(BukkitPartiesPlayerPostLeaveEvent event) {
if (event.isKicked()) {
if (event.isKicked() && event.getKicker() != null) {
Player k = Bukkit.getServer().getPlayer(event.getKicker().getPlayerUUID());
if (k != null) {
k.sendMessage(ChatColor.RED + Lang.get(k, "questPartiesKicked").replace("<player>", k.getName()));