Fix for NPE on hopper open.

This commit is contained in:
Brianna 2019-05-02 18:06:35 -04:00
parent aa9d8d8d21
commit e1762ae41f

View File

@ -53,7 +53,9 @@ public class EHopper implements Hopper {
public void overview(Player player) {
try {
if (lastPlayer != null && lastPlayer != player.getUniqueId()) {
if (lastPlayer != null
&& lastPlayer != player.getUniqueId()
&& Bukkit.getPlayer(lastPlayer) != null) {
Bukkit.getPlayer(lastPlayer).closeInventory();
}
if (placedBy == null) placedBy = player.getUniqueId();