Null-check for last commit.

This commit is contained in:
wizjany 2019-07-07 01:22:04 -04:00
parent f546700189
commit 63209d1174

View File

@ -1027,7 +1027,7 @@ private static <T extends Event & Cancellable> void handleInventoryHolderUse(T o
Entity entity = (Entity) holder;
Material mat = Materials.getRelatedMaterial((entity).getType());
UseEntityEvent useEntityEvent = new UseEntityEvent(originalEvent, cause, entity);
if (hasInteractBypass((entity).getWorld(), mat)) {
if (mat != null && hasInteractBypass((entity).getWorld(), mat)) {
useEntityEvent.setAllowed(true);
}
Events.fireToCancel(originalEvent, useEntityEvent);