|
@@ -63,17 +63,17 @@ public class BlockListener implements Listener {
|
|
|
Block futureEmptyBlock = event.getBlock().getRelative(direction);
|
|
|
|
|
|
for (Block b : blocks) {
|
|
|
- if (mcMMO.placeStore.isTrue(b)) {
|
|
|
+ if (mcMMO.p.placeStore.isTrue(b)) {
|
|
|
b.getRelative(direction).setMetadata("pistonTrack", new FixedMetadataValue(plugin, true));
|
|
|
if (b.equals(futureEmptyBlock)) {
|
|
|
- mcMMO.placeStore.setFalse(b);
|
|
|
+ mcMMO.p.placeStore.setFalse(b);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
for (Block b : blocks) {
|
|
|
if (b.getRelative(direction).hasMetadata("pistonTrack")) {
|
|
|
- mcMMO.placeStore.setTrue(b.getRelative(direction));
|
|
|
+ mcMMO.p.placeStore.setTrue(b.getRelative(direction));
|
|
|
b.getRelative(direction).removeMetadata("pistonTrack", plugin);
|
|
|
}
|
|
|
}
|
|
@@ -96,7 +96,7 @@ public class BlockListener implements Listener {
|
|
|
Block fallenBlock = event.getBlock().getRelative(BlockFace.UP);
|
|
|
|
|
|
if (fallenBlock.getType() == type) {
|
|
|
- mcMMO.placeStore.setTrue(fallenBlock);
|
|
|
+ mcMMO.p.placeStore.setTrue(fallenBlock);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -139,7 +139,7 @@ public class BlockListener implements Listener {
|
|
|
}
|
|
|
else {
|
|
|
Block newLocation = block.getRelative(0, y + 1, 0);
|
|
|
- mcMMO.placeStore.setTrue(newLocation);
|
|
|
+ mcMMO.p.placeStore.setTrue(newLocation);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -148,7 +148,7 @@ public class BlockListener implements Listener {
|
|
|
/* Check if the blocks placed should be monitored so they do not give out XP in the future */
|
|
|
if (BlockChecks.shouldBeWatched(block)) {
|
|
|
if (!((type == Material.SAND || type == Material.GRAVEL) && block.getRelative(BlockFace.DOWN).getType() == Material.AIR)) { //Don't wanna track sand that's gonna fall.
|
|
|
- mcMMO.placeStore.setTrue(block);
|
|
|
+ mcMMO.p.placeStore.setTrue(block);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -233,7 +233,7 @@ public class BlockListener implements Listener {
|
|
|
}
|
|
|
|
|
|
/* EXCAVATION */
|
|
|
- else if (BlockChecks.canBeGigaDrillBroken(block) && permInstance.excavation(player) && !mcMMO.placeStore.isTrue(block)) {
|
|
|
+ else if (BlockChecks.canBeGigaDrillBroken(block) && permInstance.excavation(player) && !mcMMO.p.placeStore.isTrue(block)) {
|
|
|
if (configInstance.getExcavationRequiresTool()) {
|
|
|
if (ItemChecks.isShovel(inHand)) {
|
|
|
Excavation.excavationProcCheck(block, player);
|
|
@@ -246,7 +246,7 @@ public class BlockListener implements Listener {
|
|
|
|
|
|
//Remove metadata when broken
|
|
|
if (BlockChecks.shouldBeWatched(block)) {
|
|
|
- mcMMO.placeStore.setFalse(block);
|
|
|
+ mcMMO.p.placeStore.setFalse(block);
|
|
|
}
|
|
|
|
|
|
//Remove metadata from fallen sand/gravel
|
|
@@ -257,11 +257,11 @@ public class BlockListener implements Listener {
|
|
|
Block relative = block.getRelative(0, y, 0);
|
|
|
Material relativeType = relative.getType();
|
|
|
|
|
|
- if ((relativeType == Material.SAND || relativeType == Material.GRAVEL) && mcMMO.placeStore.isTrue(relative)) {
|
|
|
- mcMMO.placeStore.setFalse(relative);
|
|
|
+ if ((relativeType == Material.SAND || relativeType == Material.GRAVEL) && mcMMO.p.placeStore.isTrue(relative)) {
|
|
|
+ mcMMO.p.placeStore.setFalse(relative);
|
|
|
}
|
|
|
- else if (!BlockChecks.shouldBeWatched(relative) && mcMMO.placeStore.isTrue(relative)){
|
|
|
- mcMMO.placeStore.setFalse(relative);
|
|
|
+ else if (!BlockChecks.shouldBeWatched(relative) && mcMMO.p.placeStore.isTrue(relative)){
|
|
|
+ mcMMO.p.placeStore.setFalse(relative);
|
|
|
}
|
|
|
else {
|
|
|
break;
|