Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -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;