mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
90ac03522a
This reverts commit d6e3dff7d8
.
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
--- ../work/decompile-8eb82bde//net/minecraft/server/BlockPressurePlateAbstract.java 2014-11-28 17:43:42.937707439 +0000
|
|
+++ src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java 2014-11-28 17:38:22.000000000 +0000
|
|
@@ -2,6 +2,8 @@
|
|
|
|
import java.util.Random;
|
|
|
|
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
|
+
|
|
public abstract class BlockPressurePlateAbstract extends Block {
|
|
|
|
protected BlockPressurePlateAbstract(Material material) {
|
|
@@ -90,6 +92,19 @@
|
|
int j = this.e(world, blockposition);
|
|
boolean flag = i > 0;
|
|
boolean flag1 = j > 0;
|
|
+
|
|
+ // CraftBukkit start - Interact Pressure Plate
|
|
+ org.bukkit.World bworld = world.getWorld();
|
|
+ org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
|
|
+
|
|
+ if (flag != flag1) {
|
|
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), i, j);
|
|
+ manager.callEvent(eventRedstone);
|
|
+
|
|
+ flag1 = eventRedstone.getNewCurrent() > 0;
|
|
+ j = eventRedstone.getNewCurrent();
|
|
+ }
|
|
+ // CraftBukkit end
|
|
|
|
if (i != j) {
|
|
iblockdata = this.a(iblockdata, j);
|