mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-29 23:27:28 +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;
|
Entity entity = (Entity) holder;
|
||||||
Material mat = Materials.getRelatedMaterial((entity).getType());
|
Material mat = Materials.getRelatedMaterial((entity).getType());
|
||||||
UseEntityEvent useEntityEvent = new UseEntityEvent(originalEvent, cause, entity);
|
UseEntityEvent useEntityEvent = new UseEntityEvent(originalEvent, cause, entity);
|
||||||
if (hasInteractBypass((entity).getWorld(), mat)) {
|
if (mat != null && hasInteractBypass((entity).getWorld(), mat)) {
|
||||||
useEntityEvent.setAllowed(true);
|
useEntityEvent.setAllowed(true);
|
||||||
}
|
}
|
||||||
Events.fireToCancel(originalEvent, useEntityEvent);
|
Events.fireToCancel(originalEvent, useEntityEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user