mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-06-26 06:24:51 +02: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