Skip to content

Commit 4e3ffb3

Browse files
committed
1.3.1-DEVBUILD.2
1 parent 32cfa4e commit 4e3ffb3

File tree

9 files changed

+25
-5
lines changed

9 files changed

+25
-5
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>us.thezircon.play</groupId>
88
<artifactId>AutoPickup</artifactId>
9-
<version>1.3.1-DEVBUILD.1</version>
9+
<version>1.3.1-DEVBUILD.2</version>
1010
<packaging>jar</packaging>
1111

1212
<name>AutoPickup</name>

src/main/java/us/thezircon/play/autopickup/AutoPickup.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public final class AutoPickup extends JavaPlugin {
3636
public static boolean usingUpgradableHoppers = false; // UpgradableHoppers Patch
3737
public static boolean usingLocketteProByBrunyman = false; // LockettePro Patch
3838
public static boolean usingBentoBox = false; // BentoBox - AOneBlock Patch
39+
public static boolean usingMCMMO = false;
3940
public static ArrayList<String> worldsBlacklist = null;
4041

4142
// Custom Items Patch
@@ -52,6 +53,10 @@ public void onEnable() {
5253
createBlacklist();
5354
createPlayerDataDir();
5455

56+
// MCMMO Patch
57+
if ((getServer().getPluginManager().getPlugin("mcMMO") != null)) {
58+
usingMCMMO = true;
59+
}
5560
// UpgradableHoppers Patch
5661
if ((getServer().getPluginManager().getPlugin("UpgradeableHoppers") != null)) {
5762
usingUpgradableHoppers = true;

src/main/java/us/thezircon/play/autopickup/listeners/BlockBreakEventListener.java

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
import java.time.Instant;
3030
import java.util.ArrayList;
31+
import java.util.HashSet;
3132
import java.util.List;
3233

3334
public class BlockBreakEventListener implements Listener {
@@ -145,7 +146,7 @@ public void run() {
145146
}
146147
}
147148

148-
e.setDropItems(false); // Cancel drops
149+
e.setDropItems(false); // Cancel drops
149150

150151
if (((Container) block.getState()).getInventory() instanceof DoubleChestInventory) {
151152
Chest chest = (Chest) block.getState();
@@ -202,8 +203,20 @@ public void run() {
202203
ArrayList<Material> verticalReqDown = crops.getVerticalReqDown();
203204

204205
if (verticalReq.contains(e.getBlock().getType()) || verticalReqDown.contains(e.getBlock().getType())) {
205-
e.setDropItems(false);
206-
vertBreak(player, e.getBlock().getLocation());
206+
//e.setDropItems(false);
207+
//vertBreak(player, e.getBlock().getLocation());
208+
Location tempLoc = loc.clone();
209+
while(true) {
210+
tempLoc.setY(tempLoc.getY() + 1.0D);
211+
String key2 = tempLoc.getBlockX()+";"+tempLoc.getBlockY()+";"+tempLoc.getBlockZ()+";"+tempLoc.getWorld();
212+
if (!(verticalReq.contains(tempLoc.getBlock().getType()))) {
213+
//this.addLocation(tempLoc, e.getPlayer());
214+
AutoPickup.customItemPatch.put(key2, new PickupObjective(tempLoc, player, Instant.now()));
215+
break;
216+
}
217+
AutoPickup.customItemPatch.put(key2, new PickupObjective(tempLoc, player, Instant.now()));
218+
//this.addLocation(tempLoc, e.getPlayer());
219+
}
207220
}
208221

209222
}

src/main/java/us/thezircon/play/autopickup/listeners/BlockDropItemEventListener.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package us.thezircon.play.autopickup.listeners;
22

33
import org.bukkit.Location;
4+
import org.bukkit.Material;
45
import org.bukkit.block.Block;
56
import org.bukkit.block.Container;
67
import org.bukkit.entity.Entity;
@@ -15,6 +16,7 @@
1516
import us.thezircon.play.autopickup.AutoPickup;
1617
import us.thezircon.play.autopickup.utils.AutoSmelt;
1718

19+
import java.util.HashSet;
1820
import java.util.List;
1921

2022
public class BlockDropItemEventListener implements Listener {

target/classes/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: AutoPickup
2-
version: 1.3.1-DEVBUILD.1
2+
version: 1.3.1-DEVBUILD.2
33
main: us.thezircon.play.autopickup.AutoPickup
44
prefix: AutoPickup
55
authors: [BUTTERFIELD8]
0 Bytes
Binary file not shown.
82 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)