RedstoneChange event thrown then the redstone *changes* not when it stays the same :D
Dieser Commit ist enthalten in:
Ursprung
9d9ad6bd1e
Commit
1505b4bf3c
@ -114,12 +114,14 @@ public class BlockPressurePlate extends Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
if (flag != flag1) {
|
||||||
CraftWorld craftWorld = ((WorldServer) world).getWorld();
|
CraftWorld craftWorld = ((WorldServer) world).getWorld();
|
||||||
CraftServer server = ((WorldServer) world).getServer();
|
CraftServer server = ((WorldServer) world).getServer();
|
||||||
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
|
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
|
||||||
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0);
|
BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 1 : 0, flag1 ? 1 : 0);
|
||||||
server.getPluginManager().callEvent(eventRedstone);
|
server.getPluginManager().callEvent(eventRedstone);
|
||||||
flag1 = eventRedstone.getNewCurrent() > 0;
|
flag1 = eventRedstone.getNewCurrent() > 0;
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (flag1 && !flag) {
|
if (flag1 && !flag) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren