mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Fixed some issues with static access
This commit is contained in:
@ -62,7 +62,7 @@ public class BlastMining {
|
||||
blocksDropped.add(temp);
|
||||
Mining.miningDrops(temp);
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(temp)) {
|
||||
if (!mcMMO.placeStore.isTrue(temp)) {
|
||||
for (int i = 1 ; i < extraDrops ; i++) {
|
||||
blocksDropped.add(temp);
|
||||
Mining.miningDrops(temp);
|
||||
@ -172,7 +172,7 @@ public class BlastMining {
|
||||
}
|
||||
|
||||
for (Block block : xp) {
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
Mining.miningXP(player, block);
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class Excavation {
|
||||
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(block) && !Misc.blockBreakSimulate(block, player, true)) {
|
||||
if (!mcMMO.placeStore.isTrue(block) && !Misc.blockBreakSimulate(block, player, true)) {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class Herbalism {
|
||||
else if (Config.getInstance().getHerbalismGreenThumbCobbleToMossy() && type == Material.COBBLESTONE) {
|
||||
block.setType(Material.MOSSY_COBBLESTONE);
|
||||
// Don't award double drops to mossified cobblestone
|
||||
mcMMO.p.placeStore.setTrue(block);
|
||||
mcMMO.placeStore.setTrue(block);
|
||||
}
|
||||
else if (Config.getInstance().getHerbalismGreenThumbCobbleWallToMossyWall() && type == Material.COBBLE_WALL) {
|
||||
block.setData((byte) 1);
|
||||
@ -109,7 +109,7 @@ public class Herbalism {
|
||||
switch (type) {
|
||||
case BROWN_MUSHROOM:
|
||||
case RED_MUSHROOM:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPMushrooms();
|
||||
}
|
||||
@ -120,7 +120,7 @@ public class Herbalism {
|
||||
Block b = block.getRelative(0, y, 0);
|
||||
if (b.getType().equals(Material.CACTUS)) {
|
||||
mat = Material.CACTUS;
|
||||
if (!mcMMO.p.placeStore.isTrue(b)) {
|
||||
if (!mcMMO.placeStore.isTrue(b)) {
|
||||
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(randomChance) <= herbLevel) {
|
||||
catciDrops++;
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class Herbalism {
|
||||
break;
|
||||
|
||||
case MELON_BLOCK:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.MELON;
|
||||
xp = Config.getInstance().getHerbalismXPMelon();
|
||||
}
|
||||
@ -161,7 +161,7 @@ public class Herbalism {
|
||||
|
||||
case PUMPKIN:
|
||||
case JACK_O_LANTERN:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPPumpkin();
|
||||
}
|
||||
@ -169,7 +169,7 @@ public class Herbalism {
|
||||
|
||||
case RED_ROSE:
|
||||
case YELLOW_FLOWER:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPFlowers();
|
||||
}
|
||||
@ -180,7 +180,7 @@ public class Herbalism {
|
||||
Block b = block.getRelative(0, y, 0);
|
||||
if (b.getType().equals(Material.SUGAR_CANE_BLOCK)) {
|
||||
mat = Material.SUGAR_CANE;
|
||||
if (!mcMMO.p.placeStore.isTrue(b)) {
|
||||
if (!mcMMO.placeStore.isTrue(b)) {
|
||||
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(randomChance) <= herbLevel) {
|
||||
caneDrops++;
|
||||
}
|
||||
@ -191,14 +191,14 @@ public class Herbalism {
|
||||
break;
|
||||
|
||||
case VINE:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = type;
|
||||
xp = Config.getInstance().getHerbalismXPVines();
|
||||
}
|
||||
break;
|
||||
|
||||
case WATER_LILY:
|
||||
if (!mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = type;
|
||||
xp = Config.getInstance().getHerbalismXPLilyPads();
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ public class Mining {
|
||||
* @param block The block being broken
|
||||
*/
|
||||
public static void miningBlockCheck(Player player, Block block) {
|
||||
if (mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -362,7 +362,7 @@ public class Mining {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mcMMO.p.placeStore.isTrue(block) || Misc.blockBreakSimulate(block, player, true)) {
|
||||
if (mcMMO.placeStore.isTrue(block) || Misc.blockBreakSimulate(block, player, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -408,7 +408,7 @@ public class Mining {
|
||||
case NETHERRACK:
|
||||
case SANDSTONE:
|
||||
case STONE:
|
||||
if (mcMMO.p.placeStore.isTrue(block) || Misc.blockBreakSimulate(block, player, true)) {
|
||||
if (mcMMO.placeStore.isTrue(block) || Misc.blockBreakSimulate(block, player, true)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class WoodCutting {
|
||||
CustomBlock block = ModChecks.getCustomBlock(x);
|
||||
item = block.getItemDrop();
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(x)) {
|
||||
if (!mcMMO.placeStore.isTrue(x)) {
|
||||
WoodCutting.woodCuttingProcCheck(player, x);
|
||||
xp = block.getXpGain();
|
||||
}
|
||||
@ -169,7 +169,7 @@ public class WoodCutting {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(x)) {
|
||||
if (!mcMMO.placeStore.isTrue(x)) {
|
||||
WoodCutting.woodCuttingProcCheck(player, x);
|
||||
|
||||
switch (species) {
|
||||
@ -245,7 +245,7 @@ public class WoodCutting {
|
||||
Block zNegative = currentBlock.getRelative(0, 0, -1);
|
||||
Block yPositive = currentBlock.getRelative(0, 1, 0);
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(currentBlock)) {
|
||||
if (!mcMMO.placeStore.isTrue(currentBlock)) {
|
||||
if (!isTooAggressive(currentBlock, xPositive) && BlockChecks.treeFellerCompatible(xPositive) && !toBeFelled.contains(xPositive)) {
|
||||
processTreeFelling(xPositive, toBeFelled);
|
||||
}
|
||||
@ -277,7 +277,7 @@ public class WoodCutting {
|
||||
Block corner3 = currentBlock.getRelative(-1, 0, 1);
|
||||
Block corner4 = currentBlock.getRelative(-1, 0, -1);
|
||||
|
||||
if (!mcMMO.p.placeStore.isTrue(currentBlock)) {
|
||||
if (!mcMMO.placeStore.isTrue(currentBlock)) {
|
||||
if (!isTooAggressive(currentBlock, corner1) && BlockChecks.treeFellerCompatible(corner1) && !toBeFelled.contains(corner1)) {
|
||||
processTreeFelling(corner1, toBeFelled);
|
||||
}
|
||||
@ -297,7 +297,7 @@ public class WoodCutting {
|
||||
}
|
||||
|
||||
if (BlockChecks.treeFellerCompatible(yPositive)) {
|
||||
if(!mcMMO.p.placeStore.isTrue(currentBlock) && !toBeFelled.contains(yPositive)) {
|
||||
if(!mcMMO.placeStore.isTrue(currentBlock) && !toBeFelled.contains(yPositive)) {
|
||||
processTreeFelling(yPositive, toBeFelled);
|
||||
}
|
||||
}
|
||||
@ -421,7 +421,7 @@ public class WoodCutting {
|
||||
PlayerProfile profile = Users.getProfile(player);
|
||||
int xp = 0;
|
||||
|
||||
if (mcMMO.p.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user