1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 18:33:00 +01:00

PlayerListener cleanup

This commit is contained in:
GJ
2013-01-24 14:19:26 -05:00
parent 9dac898c1c
commit 76a987e1e0
13 changed files with 209 additions and 132 deletions

View File

@@ -76,7 +76,7 @@ public class BlockChecks {
* @param block Block to check
* @return true if the block should allow ability activation, false otherwise
*/
public static boolean abilityBlockCheck(Block block) {
public static boolean canActivateAbilities(Block block) {
ItemStack item = (new MaterialData(block.getTypeId(), block.getData())).toItemStack(1);
if (customBlocksEnabled && CustomBlocksConfig.getInstance().customAbilityBlocks.contains(item)) {
@@ -151,7 +151,7 @@ public class BlockChecks {
* @param block The block to check
* @return true if the block can be made mossy, false otherwise
*/
public static boolean makeMossy(Block block) {
public static boolean canMakeMossy(Block block) {
switch (block.getType()) {
case COBBLESTONE:
case DIRT:
@@ -314,4 +314,16 @@ public class BlockChecks {
return false;
}
}
public static boolean canActivateHerbalism(Block block) {
switch (block.getType()) {
case DIRT:
case GRASS:
case SOIL:
return false;
default:
return true;
}
}
}