Add BlockRedstoneEvent to Redstone Lamps, Addresses BUKKIT-1431

By: feildmaster <admin@feildmaster.com>
This commit is contained in:
CraftBukkit/Spigot 2012-04-02 09:01:48 -05:00
parent 495ebd7020
commit ee87f28221

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;
}
}