mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 22:56:18 +01:00
Null-check for last commit.
This commit is contained in:
parent
f546700189
commit
63209d1174
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user