Only call event when turning pressure plate on. Fixes BUKKIT-3881
This commit is contained in:
parent
82e05d435b
commit
af7ea28bc7
@ -43,7 +43,8 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
|
|||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Entity entity = (Entity) iterator.next();
|
Entity entity = (Entity) iterator.next();
|
||||||
|
|
||||||
// CraftBukkit start - Fire interact event when turning on a pressure plate
|
// CraftBukkit start - Call interact event when turning on a pressure plate
|
||||||
|
if (this.c(world.getData(i, j, k)) == 0) {
|
||||||
org.bukkit.World bworld = world.getWorld();
|
org.bukkit.World bworld = world.getWorld();
|
||||||
org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
|
org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
|
||||||
org.bukkit.event.Cancellable cancellable;
|
org.bukkit.event.Cancellable cancellable;
|
||||||
@ -59,6 +60,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
|
|||||||
if (cancellable.isCancelled()) {
|
if (cancellable.isCancelled()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (!entity.at()) {
|
if (!entity.at()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user