From 837e59d187c7aa0cdc1bcc0a49b99edd57f8b6c1 Mon Sep 17 00:00:00 2001 From: TfT_02 Date: Sat, 12 Apr 2014 17:06:14 +0200 Subject: [PATCH] Check if player has a mcMMOPlayer object Fixes #1976 --- Changelog.txt | 1 + src/main/java/com/gmail/nossr50/listeners/PlayerListener.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog.txt b/Changelog.txt index 6af54aad2..ab602620d 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -13,6 +13,7 @@ Version 1.5.01-dev + Added support for `MATERIAL|data` format in treasures.yml = Fixed bug where the Updater was running on the main thread. = Fixed bug when players would use /ptp without being in a party + = Fixed bug where player didn't have a mcMMOPlayer object in AsyncPlayerChatEvent ! Vanished players no longer get hit by AoE effects Version 1.5.00 diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 2a624fc4a..5ff3b17a5 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -629,7 +629,7 @@ public class PlayerListener implements Listener { public void onPlayerChat(AsyncPlayerChatEvent event) { Player player = event.getPlayer(); - if (Misc.isNPCEntity(player)) { + if (Misc.isNPCEntity(player) || !UserManager.hasPlayerDataKey(player)) { return; }