mirror of
https://github.com/songoda/UltimateRepairing.git
synced 2024-12-01 15:03:23 +01:00
Fix for messy inventory add system.
This commit is contained in:
parent
cd58e83711
commit
aa8b924244
@ -4,7 +4,7 @@ stages:
|
||||
variables:
|
||||
name: "UltimateRepairing"
|
||||
path: "/builds/$CI_PROJECT_PATH"
|
||||
version: "1.2.3"
|
||||
version: "1.2.4"
|
||||
|
||||
build:
|
||||
stage: build
|
||||
|
@ -330,12 +330,9 @@ public class RepairHandler {
|
||||
player.getWorld().playEffect(location, effect, blockTypeFinal);
|
||||
player.getWorld().playEffect(location, effect, Material.ANVIL);
|
||||
player.sendMessage(Methods.formatText(instance.references.getPrefix() + instance.getLocale().getMessage("event.repair.success")));
|
||||
ItemStack repairedi = playerData.getToBeRepaired();
|
||||
repairedi.setDurability((short) 0);
|
||||
Item repaired = player.getWorld().dropItemNaturally(player.getLocation(), repairedi);
|
||||
repaired.remove();
|
||||
HashMap<Integer, ItemStack> items = player.getInventory().addItem(playerData.getToBeRepaired());
|
||||
|
||||
playerData.getToBeRepaired().setDurability((short) 0);
|
||||
HashMap<Integer, ItemStack> items = player.getInventory().addItem(playerData.getToBeRepaired());
|
||||
for (ItemStack item : items.values()) {
|
||||
player.getWorld().dropItemNaturally(player.getLocation(), item);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user