Skip to content

Commit 86c2833

Browse files
committed
LockettePro Support
1 parent 15ff494 commit 86c2833

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

AutoPickup - Recode.iml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
<orderEntry type="library" scope="PROVIDED" name="Maven: com.google.code.gson:gson:2.8.0" level="project" />
2828
<orderEntry type="library" scope="PROVIDED" name="Maven: net.md-5:bungeecord-chat:1.16-R0.3" level="project" />
2929
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
30+
<orderEntry type="library" name="LockettePro-2.10.7" level="project" />
3031
</component>
3132
</module>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public final class AutoPickup extends JavaPlugin {
2727
public TallCrops crops;
2828

2929
public static boolean usingUpgradableHoppers = false; // UpgradableHoppers Patch
30+
public static boolean usingLocketteProByBrunyman = false; // LockettePro Patch
3031
public static ArrayList<String> worldsBlacklist = null;
3132

3233
@Override
@@ -43,6 +44,10 @@ public void onEnable() {
4344
if ((getServer().getPluginManager().getPlugin("UpgradeableHoppers") != null)) {
4445
usingUpgradableHoppers = true;
4546
}
47+
// LockettePro Patch
48+
if ((getServer().getPluginManager().getPlugin("LockettePro") != null)) {
49+
usingLocketteProByBrunyman = true;
50+
}
4651

4752
messages = new Messages();
4853

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

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

3+
import me.crafter.mc.lockettepro.LocketteProAPI;
34
import org.bukkit.*;
45
import org.bukkit.block.*;
56
import org.bukkit.enchantments.Enchantment;
@@ -43,6 +44,12 @@ public void onBreak(BlockBreakEvent e) {
4344
return;
4445
}
4546

47+
// LockettePro Patch
48+
if (AutoPickup.usingLocketteProByBrunyman) {
49+
if (LocketteProAPI.isLocked(block)) {
50+
return;
51+
}
52+
}
4653

4754
// Mend Items & Give Player XP
4855
int xp = e.getExpToDrop();
0 Bytes
Binary file not shown.
104 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)