Skip to content

Commit

Permalink
Update BlockBreakEventListener.java
Browse files Browse the repository at this point in the history
  • Loading branch information
MrButtersDEV committed Dec 1, 2022
1 parent 44c9d8e commit c1cdc90
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ public void run() {
}
}.runTaskLater(PLUGIN, 1);

///////////////////////////////////// Custom items \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
String key = loc.getBlockX()+";"+loc.getBlockY()+";"+loc.getBlockZ()+";"+loc.getWorld();
AutoPickup.customItemPatch.put(key, new PickupObjective(loc, player, Instant.now()));
///////////////////////////////////////////////////////////////////////////////////////

// Mend Items & Give Player XP
int xp = e.getExpToDrop();
player.giveExp(xp); // Give player XP
Expand All @@ -147,11 +152,6 @@ public void run() {
}
e.setExpToDrop(0); // Remove default XP

///////////////////////////////////// Custom items \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
String key = loc.getBlockX()+";"+loc.getBlockY()+";"+loc.getBlockZ()+";"+loc.getWorld();
AutoPickup.customItemPatch.put(key, new PickupObjective(loc, player, Instant.now()));
///////////////////////////////////////////////////////////////////////////////////////

// Deal with Containers
if (block.getState() instanceof Container) {

Expand Down Expand Up @@ -179,7 +179,7 @@ public void run() {

// Peaceful Farms - PFMoreHoppers Patch
if (block.getState() instanceof Hopper && AutoPickup.usingPFMoreHoppers) {
NamespacedKey morePFHoppers = new NamespacedKey(PLUGIN.getServer().getPluginManager().getPlugin("PFMoreHoppers"), "pfmorehoppers:pfhopper-variant");
NamespacedKey morePFHoppers = new NamespacedKey(PLUGIN.getServer().getPluginManager().getPlugin("PFMoreHoppers"), "PFHopper-Variant");
Container con = (Container) block.getState();
if (con.getPersistentDataContainer().getKeys().contains(morePFHoppers)) {
return;
Expand Down

0 comments on commit c1cdc90

Please sign in to comment.