mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
SPIGOT-6852: BlockReceiveGameEvent#getBlock returning wrong block
By: md_5 <git@md-5.net>
This commit is contained in:
parent
ef17571a38
commit
94c2fa1b14
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@
|
|||
- if (!this.config.shouldListen(world, this, blockposition, gameevent, entity)) {
|
||||
+ // CraftBukkit start
|
||||
+ 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());
|
||||
+ BlockReceiveGameEvent event = new BlockReceiveGameEvent(org.bukkit.GameEvent.getByKey(CraftNamespacedKey.fromMinecraft(IRegistry.GAME_EVENT.getKey(gameevent))), CraftBlock.at(world, blockposition1), (entity == null) ? null : entity.getBukkitEntity());
|
||||
+ event.setCancelled(defaultCancel);
|
||||
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled()) {
|
||||
|
|
Loading…
Reference in a new issue