Ensure player is not null during move event, fixes #1116

This commit is contained in:
PikaMug 2020-03-17 23:05:09 -04:00
parent 079b639af5
commit 5c7b12c6cb

View File

@ -1024,6 +1024,9 @@ public class PlayerListener implements Listener {
if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) { if (evt.getFrom().getBlock().equals(evt.getTo().getBlock())) {
return; return;
} }
if (evt.getPlayer() == null) {
return;
}
if (plugin.getDependencies().getCitizens() != null) { if (plugin.getDependencies().getCitizens() != null) {
if (CitizensAPI.getNPCRegistry().isNPC(evt.getPlayer())) { if (CitizensAPI.getNPCRegistry().isNPC(evt.getPlayer())) {
return; return;