1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Fixed Shulker Boxes not dropping with contents in them

This commit is contained in:
John000708 2017-02-06 19:56:37 +01:00
parent 0d2ff61387
commit 4c5f7d5766

View File

@ -13,11 +13,7 @@ import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.block.Block; import org.bukkit.block.*;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Chest;
import org.bukkit.block.CreatureSpawner;
import org.bukkit.block.Dispenser;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.ArmorStand; import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
@ -2023,6 +2019,9 @@ public class SlimefunSetup {
else if (b.getType().equals(Material.SKULL)) { else if (b.getType().equals(Material.SKULL)) {
b.breakNaturally(); b.breakNaturally();
} }
else if (b.getType().name().endsWith("_SHULKER_BOX")) {
b.breakNaturally();
}
else { else {
for (ItemStack drop: b.getDrops()) { for (ItemStack drop: b.getDrops()) {
b.getWorld().dropItemNaturally(b.getLocation(), (b.getType().toString().endsWith("_ORE") && !b.getType().equals(Material.IRON_ORE) && !b.getType().equals(Material.GOLD_ORE)) ? new CustomItem(drop, fortune): drop); b.getWorld().dropItemNaturally(b.getLocation(), (b.getType().toString().endsWith("_ORE") && !b.getType().equals(Material.IRON_ORE) && !b.getType().equals(Material.GOLD_ORE)) ? new CustomItem(drop, fortune): drop);