diff --git a/src/main/java/com/badbones69/crazycrates/listeners/crates/QuadCrateListener.java b/src/main/java/com/badbones69/crazycrates/listeners/crates/QuadCrateListener.java index 47e2168ac..90cb3192e 100644 --- a/src/main/java/com/badbones69/crazycrates/listeners/crates/QuadCrateListener.java +++ b/src/main/java/com/badbones69/crazycrates/listeners/crates/QuadCrateListener.java @@ -96,18 +96,17 @@ public void onChestClick(PlayerInteractEvent event) { display.setItemMeta(itemMeta); // Convert the item stack to item builder. - // The max integer prevents it from stacking. - final ItemStack itemStack = ItemUtils.convertItemStack(display).addDisplayLore(ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE) + "").getStack(); + final ItemStack itemStack = ItemUtils.convertItemStack(display).getStack(); // Drop the item. final Item reward = player.getWorld().dropItem(block.getLocation().add(.5, 1, .5), itemStack); // Set data - reward.setMetadata("betterdrops_ignore", new FixedMetadataValue(plugin, true)); reward.setVelocity(new Vector(0, .2, 0)); reward.customName(itemMeta.displayName()); reward.setCustomNameVisible(true); - reward.setPickupDelay(Integer.MAX_VALUE); + reward.setCanMobPickup(false); + reward.setCanPlayerPickup(false); // Add open crates session.getCratesOpened().put(block.getLocation(), true); diff --git a/src/main/java/com/badbones69/crazycrates/tasks/crates/types/QuickCrate.java b/src/main/java/com/badbones69/crazycrates/tasks/crates/types/QuickCrate.java index 5e486e270..a42095a62 100644 --- a/src/main/java/com/badbones69/crazycrates/tasks/crates/types/QuickCrate.java +++ b/src/main/java/com/badbones69/crazycrates/tasks/crates/types/QuickCrate.java @@ -151,11 +151,11 @@ public void open(@NotNull final KeyType type, final boolean checkHand) { return; } - reward.setMetadata("betterdrops_ignore", new FixedMetadataValue(this.plugin, true)); reward.setVelocity(new Vector(0, .2, 0)); reward.customName(AdvUtil.parse(prize.getPrizeName())); reward.setCustomNameVisible(true); - reward.setPickupDelay(-1); + reward.setCanMobPickup(false); + reward.setCanPlayerPickup(false); this.crateManager.addReward(player, reward);