Protect our managers.

This commit is contained in:
GJ
2013-04-25 09:16:42 -04:00
parent a2fefd6fb6
commit 98dc7b853a
17 changed files with 57 additions and 44 deletions

View File

@ -63,7 +63,7 @@ public class Herbalism {
protected static int calculateCatciAndSugarDrops(BlockState blockState) {
Block block = blockState.getBlock();
Material blockType = blockState.getType();
int dropAmount = mcMMO.placeStore.isTrue(block) ? 0 : 1;
int dropAmount = mcMMO.getPlaceStore().isTrue(block) ? 0 : 1;
// Handle the two blocks above it - cacti & sugar cane can only grow 3 high naturally
for (int y = 1; y < 3; y++) {
@ -73,8 +73,8 @@ public class Herbalism {
break;
}
if (mcMMO.placeStore.isTrue(relativeBlock)) {
mcMMO.placeStore.setFalse(relativeBlock);
if (mcMMO.getPlaceStore().isTrue(relativeBlock)) {
mcMMO.getPlaceStore().setFalse(relativeBlock);
}
else {
dropAmount++;

View File

@ -118,7 +118,7 @@ public class HerbalismManager extends SkillManager {
Material material = blockState.getType();
boolean oneBlockPlant = !(material == Material.CACTUS || material == Material.SUGAR_CANE_BLOCK);
if (oneBlockPlant && mcMMO.placeStore.isTrue(blockState)) {
if (oneBlockPlant && mcMMO.getPlaceStore().isTrue(blockState)) {
return;
}
@ -206,8 +206,8 @@ public class HerbalismManager extends SkillManager {
case RED_ROSE:
case YELLOW_FLOWER:
if (mcMMO.placeStore.isTrue(blockState)) {
mcMMO.placeStore.setFalse(blockState);
if (mcMMO.getPlaceStore().isTrue(blockState)) {
mcMMO.getPlaceStore().setFalse(blockState);
return false;
}