mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-11-01 00:10:19 +01:00
Drop item if inventory full.
This commit is contained in:
parent
cfb11797ad
commit
d52f11dfb8
@ -327,7 +327,12 @@ public class RepairHandler {
|
||||
repairedi.setDurability((short) 0);
|
||||
Item repaired = player.getWorld().dropItemNaturally(player.getLocation(), repairedi);
|
||||
repaired.remove();
|
||||
player.getInventory().addItem(playerData.getToBeRepaired());
|
||||
HashMap<Integer, ItemStack> items = player.getInventory().addItem(playerData.getToBeRepaired());
|
||||
|
||||
for (ItemStack item : items.values()) {
|
||||
player.getWorld().dropItemNaturally(p.getLocation(), item);
|
||||
}
|
||||
|
||||
playerData.getItem().remove();
|
||||
if (player.getGameMode() != GameMode.CREATIVE &&
|
||||
type == RepairType.XP) {
|
||||
|
Loading…
Reference in New Issue
Block a user