mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-12-26 18:47:57 +01:00
Cleanup.
This commit is contained in:
parent
6e8cfe5ec9
commit
de1539ac1d
@ -114,9 +114,8 @@ public class mcBlockListener implements Listener {
|
|||||||
|
|
||||||
//Wheat && Triple drops
|
//Wheat && Triple drops
|
||||||
if (PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block)) {
|
if (PP.getGreenTerraMode() && Herbalism.canBeGreenTerra(block)) {
|
||||||
//Called twice for triple drop functionality
|
|
||||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
|
||||||
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
Herbalism.herbalismProcCheck(block, player, event, plugin);
|
||||||
|
Herbalism.herbalismProcCheck(block, player, event, plugin); //Called twice for triple drop functionality
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 0x5 && Herbalism.canBeGreenTerra(block)) {
|
if (mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 0x5 && Herbalism.canBeGreenTerra(block)) {
|
||||||
@ -152,6 +151,7 @@ public class mcBlockListener implements Listener {
|
|||||||
if (PP.getTreeFellerMode() && mcPermissions.getInstance().woodCuttingAbility(player)) {
|
if (PP.getTreeFellerMode() && mcPermissions.getInstance().woodCuttingAbility(player)) {
|
||||||
WoodCutting.treeFeller(event, plugin);
|
WoodCutting.treeFeller(event, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* EXCAVATION
|
* EXCAVATION
|
||||||
*/
|
*/
|
||||||
@ -263,12 +263,18 @@ public class mcBlockListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Monitor BlockFromTo events.
|
||||||
|
*
|
||||||
|
* @param event The event to monitor
|
||||||
|
*/
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBlockFromTo(BlockFromToEvent event)
|
public void onBlockFromTo(BlockFromToEvent event) {
|
||||||
{
|
|
||||||
Block blockFrom = event.getBlock();
|
Block blockFrom = event.getBlock();
|
||||||
Block blockTo = event.getToBlock();
|
Block blockTo = event.getToBlock();
|
||||||
if(BlockChecks.shouldBeWatched(blockFrom.getType()) && blockFrom.getData() == (byte)5)
|
|
||||||
blockTo.setData((byte)5);
|
if (BlockChecks.shouldBeWatched(blockFrom.getType()) && blockFrom.getData() == (byte) 5) {
|
||||||
|
blockTo.setData((byte) 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user