Just breaking some redstone plugins, don't mind me

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-02-08 12:53:30 +00:00
parent 516b5b2226
commit d19bdf7a67
3 changed files with 15 additions and 15 deletions

View File

@ -83,7 +83,7 @@ public class BlockListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onBlockRedstoneChange(BlockFromToEvent event) { public void onBlockRedstoneChange(BlockRedstoneEvent event) {
} }
/** /**

View File

@ -1,43 +1,43 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.bukkit.event.block; package org.bukkit.event.block;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
/** /**
* * Called when a redstone current changes
* @author Nathan
*/ */
public class BlockRedstoneEvent extends BlockFromToEvent { public class BlockRedstoneEvent extends BlockEvent {
private int oldCurrent; private int oldCurrent;
private int newCurrent; private int newCurrent;
public BlockRedstoneEvent(Block block, BlockFace face, int oldCurrent, int newCurrent) { public BlockRedstoneEvent(Block block, int oldCurrent, int newCurrent) {
super(Type.REDSTONE_CHANGE, block, face); super(Type.REDSTONE_CHANGE, block);
this.oldCurrent = oldCurrent; this.oldCurrent = oldCurrent;
this.newCurrent = newCurrent; this.newCurrent = newCurrent;
} }
/** /**
* @return the oldCurrent * Gets the old current of this block
*
* @return The previous current
*/ */
public int getOldCurrent() { public int getOldCurrent() {
return oldCurrent; return oldCurrent;
} }
/** /**
* @return the newCurrent * Gets the new current of this block
*
* @return The new current
*/ */
public int getNewCurrent() { public int getNewCurrent() {
return newCurrent; 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) { public void setNewCurrent(int newCurrent) {
this.newCurrent = newCurrent; this.newCurrent = newCurrent;

View File

@ -243,7 +243,7 @@ public final class JavaPluginLoader implements PluginLoader {
}; };
case REDSTONE_CHANGE: case REDSTONE_CHANGE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((BlockListener)listener).onBlockRedstoneChange( (BlockFromToEvent)event ); ((BlockListener)listener).onBlockRedstoneChange( (BlockRedstoneEvent)event );
} }
}; };
case BLOCK_BURN: case BLOCK_BURN: