Add BlockRedstoneEvent to Redstone Lamps, Addresses BUKKIT-1431

This commit is contained in:
feildmaster
2012-04-02 09:01:48 -05:00
parent ed8cf5196e
commit a963880bd8
2 changed files with 26 additions and 0 deletions

View File

@@ -510,4 +510,10 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(event);
return event;
}
public static BlockRedstoneEvent callRedstoneChange(World world, int x, int y, int z, int oldCurrent, int newCurrent) {
BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(x, y, z), oldCurrent, newCurrent);
world.getServer().getPluginManager().callEvent(event);
return event;
}
}