geforkt von Mirrors/Paper
SPIGOT-6852: BlockReceiveGameEvent#getBlock returning wrong block
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
ef17571a38
Commit
94c2fa1b14
@ -21,7 +21,7 @@
|
|||||||
- if (!this.config.shouldListen(world, this, blockposition, gameevent, entity)) {
|
- if (!this.config.shouldListen(world, this, blockposition, gameevent, entity)) {
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ boolean defaultCancel = !this.config.shouldListen(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());
|
+ 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);
|
+ event.setCancelled(defaultCancel);
|
||||||
+ world.getCraftServer().getPluginManager().callEvent(event);
|
+ world.getCraftServer().getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren