mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Clean up more of block listener.
This commit is contained in:
parent
3cca6d9ab4
commit
46f1157030
@ -60,8 +60,7 @@ public class BlockListener implements Listener {
|
|||||||
public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
public void onBlockPistonExtend(BlockPistonExtendEvent event) {
|
||||||
List<Block> blocks = event.getBlocks();
|
List<Block> blocks = event.getBlocks();
|
||||||
BlockFace direction = event.getDirection();
|
BlockFace direction = event.getDirection();
|
||||||
// Block that would be air after piston is finished
|
Block futureEmptyBlock = event.getBlock().getRelative(direction); // Block that would be air after piston is finished
|
||||||
Block futureEmptyBlock = event.getBlock().getRelative(direction);
|
|
||||||
|
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
if (mcMMO.placeStore.isTrue(b)) {
|
if (mcMMO.placeStore.isTrue(b)) {
|
||||||
@ -83,7 +82,7 @@ public class BlockListener implements Listener {
|
|||||||
/**
|
/**
|
||||||
* Monitor BlockPistonRetract events.
|
* Monitor BlockPistonRetract events.
|
||||||
*
|
*
|
||||||
* @param event The event to monitor
|
* @param event The event to watch
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
public void onBlockPistonRetract(BlockPistonRetractEvent event) {
|
||||||
@ -249,6 +248,7 @@ public class BlockListener implements Listener {
|
|||||||
*
|
*
|
||||||
* @param event The event to modify
|
* @param event The event to modify
|
||||||
*/
|
*/
|
||||||
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onBlockDamageHigher(BlockDamageEvent event) {
|
public void onBlockDamageHigher(BlockDamageEvent event) {
|
||||||
if (event instanceof FakeBlockDamageEvent) {
|
if (event instanceof FakeBlockDamageEvent) {
|
||||||
return;
|
return;
|
||||||
@ -303,7 +303,7 @@ public class BlockListener implements Listener {
|
|||||||
*
|
*
|
||||||
* @param event The event to watch
|
* @param event The event to watch
|
||||||
*/
|
*/
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onBlockDamage(BlockDamageEvent event) {
|
public void onBlockDamage(BlockDamageEvent event) {
|
||||||
if (event instanceof FakeBlockDamageEvent) {
|
if (event instanceof FakeBlockDamageEvent) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user