Ignore null EquipmentSlot, fixes #592

This commit is contained in:
BuildTools 2018-12-26 22:09:14 -05:00
parent 330e92ef72
commit fe92c86584

View File

@ -190,6 +190,9 @@ public class PlayerListener implements Listener {
@EventHandler
public void onPlayerInteract(PlayerInteractEvent evt) {
EquipmentSlot e = evt.getHand(); //Get the hand of the event and set it to 'e'.
if (e == null) {
return;
}
if (e.equals(EquipmentSlot.HAND)) { //If the event is fired by HAND (main hand)
if (plugin.checkQuester(evt.getPlayer().getUniqueId()) == false) {