mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 06:42:02 +01:00
Just breaking some redstone plugins, don't mind me
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
516b5b2226
commit
d19bdf7a67
@ -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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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;
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user