Skip to content

Commit f4ec959

Browse files
committed
RoseStacker duplication patch
1 parent 430cf01 commit f4ec959

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ public void run() {
131131
}
132132
}.runTaskLater(PLUGIN, 1);
133133

134-
///////////////////////////////////// Custom items \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
135-
String key = loc.getBlockX()+";"+loc.getBlockY()+";"+loc.getBlockZ()+";"+loc.getWorld();
136-
AutoPickup.customItemPatch.put(key, new PickupObjective(loc, player, Instant.now()));
137-
///////////////////////////////////////////////////////////////////////////////////////
138-
139134
// Mend Items & Give Player XP
140135
int xp = e.getExpToDrop();
141136
player.giveExp(xp); // Give player XP
@@ -268,8 +263,14 @@ public void run() {
268263
// }
269264
// }
270265

266+
return;
271267
}
272268

269+
///////////////////////////////////// Custom items \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
270+
String key = loc.getBlockX()+";"+loc.getBlockY()+";"+loc.getBlockZ()+";"+loc.getWorld();
271+
AutoPickup.customItemPatch.put(key, new PickupObjective(loc, player, Instant.now()));
272+
///////////////////////////////////////////////////////////////////////////////////////
273+
273274
TallCrops crops = PLUGIN.getCrops();
274275
ArrayList<Material> verticalReq = crops.getVerticalReq();
275276
ArrayList<Material> verticalReqDown = crops.getVerticalReqDown();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.bukkit.Location;
44
import org.bukkit.entity.Player;
55
import org.bukkit.event.EventHandler;
6+
import org.bukkit.event.EventPriority;
67
import org.bukkit.event.Listener;
78
import org.bukkit.event.entity.ItemSpawnEvent;
89
import org.bukkit.inventory.ItemStack;
@@ -19,7 +20,7 @@ public class ItemSpawnEventListener implements Listener {
1920

2021
///////////////////////////////////// Custom items \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
2122

22-
@EventHandler
23+
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
2324
public void onSpawn(ItemSpawnEvent e) {
2425
boolean doBlacklist = PLUGIN.getBlacklistConf().getBoolean("doBlacklisted");
2526
List<String> blacklist = PLUGIN.getBlacklistConf().getStringList("Blacklisted");

0 commit comments

Comments
 (0)