@@ -18,14 +18,14 @@
|
||||
} else {
|
||||
BlockPosition blockposition1 = (BlockPosition) optional.get();
|
||||
|
||||
- if (!this.config.a(world, this, blockposition, gameevent, entity)) {
|
||||
- if (!this.config.shouldListen(world, this, blockposition, gameevent, entity)) {
|
||||
+ // CraftBukkit start
|
||||
+ boolean defaultCancel = !this.config.a(world, this, blockposition, gameevent, entity);
|
||||
+ boolean defaultCancel = !this.config.shouldListen(world, this, blockposition, gameevent, entity);
|
||||
+ BlockReceiveGameEvent event = new BlockReceiveGameEvent(org.bukkit.GameEvent.getByKey(CraftNamespacedKey.fromMinecraft(IRegistry.GAME_EVENT.getKey(gameevent))), CraftBlock.at(world, blockposition), (entity == null) ? null : entity.getBukkitEntity());
|
||||
+ event.setCancelled(defaultCancel);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled()) {
|
||||
+ // CraftBukkit end
|
||||
return false;
|
||||
} else if (this.a(world, blockposition, blockposition1)) {
|
||||
} else if (this.isOccluded(world, blockposition, blockposition1)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user