Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 12:00:07 +01:00
SPIGOT-4064: Fix BlockPistonRetractEvent for regular pistons
Dieser Commit ist enthalten in:
Ursprung
66b62a63b5
Commit
fa6e97a8f8
@ -19,25 +19,25 @@
|
||||
public class BlockPiston extends BlockDirectional {
|
||||
|
||||
public static final BlockStateBoolean EXTENDED = BlockProperties.f;
|
||||
@@ -109,6 +121,18 @@
|
||||
b0 = 2;
|
||||
}
|
||||
@@ -111,6 +123,18 @@
|
||||
}
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.sticky) {
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
|
||||
+ world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ // PAIL: checkME - what happened to setTypeAndData?
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ if (!this.sticky) {
|
||||
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+ BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
|
||||
+ world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ // PAIL: checkME - what happened to setTypeAndData?
|
||||
+ // CraftBukkit end
|
||||
world.playBlockAction(blockposition, this, b0, enumdirection.a());
|
||||
}
|
||||
|
||||
@@ -271,6 +295,48 @@
|
||||
IBlockData[] aiblockdata = new IBlockData[j];
|
||||
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren