diff --git a/src/main/java/org/bukkit/event/block/BlockListener.java b/src/main/java/org/bukkit/event/block/BlockListener.java index 7b7305f2..c5964688 100644 --- a/src/main/java/org/bukkit/event/block/BlockListener.java +++ b/src/main/java/org/bukkit/event/block/BlockListener.java @@ -83,7 +83,7 @@ public class BlockListener implements Listener { * * @param event Relevant event details */ - public void onBlockRedstoneChange(BlockFromToEvent event) { + public void onBlockRedstoneChange(BlockRedstoneEvent event) { } /** diff --git a/src/main/java/org/bukkit/event/block/BlockRedstoneEvent.java b/src/main/java/org/bukkit/event/block/BlockRedstoneEvent.java index bdad758f..3c26b6e0 100644 --- a/src/main/java/org/bukkit/event/block/BlockRedstoneEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockRedstoneEvent.java @@ -1,43 +1,43 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package org.bukkit.event.block; import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; /** - * - * @author Nathan + * Called when a redstone current changes */ -public class BlockRedstoneEvent extends BlockFromToEvent { +public class BlockRedstoneEvent extends BlockEvent { private int oldCurrent; private int newCurrent; - public BlockRedstoneEvent(Block block, BlockFace face, int oldCurrent, int newCurrent) { - super(Type.REDSTONE_CHANGE, block, face); + public BlockRedstoneEvent(Block block, int oldCurrent, int newCurrent) { + super(Type.REDSTONE_CHANGE, block); this.oldCurrent = oldCurrent; this.newCurrent = newCurrent; } /** - * @return the oldCurrent + * Gets the old current of this block + * + * @return The previous current */ public int getOldCurrent() { return oldCurrent; } /** - * @return the newCurrent + * Gets the new current of this block + * + * @return The new current */ public int getNewCurrent() { return newCurrent; } /** - * @param newCurrent the newCurrent to set + * Sets the new current of this block + * + * @param newCurrent The new current to set */ public void setNewCurrent(int newCurrent) { this.newCurrent = newCurrent; diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index 1d389523..f3a470ec 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -243,7 +243,7 @@ public final class JavaPluginLoader implements PluginLoader { }; case REDSTONE_CHANGE: return new EventExecutor() { public void execute( Listener listener, Event event ) { - ((BlockListener)listener).onBlockRedstoneChange( (BlockFromToEvent)event ); + ((BlockListener)listener).onBlockRedstoneChange( (BlockRedstoneEvent)event ); } }; case BLOCK_BURN: