Fixed duplication glitch

This commit is contained in:
Auxilor 2020-11-10 18:40:07 +00:00
parent 2401a49efb
commit 4c441dacfc

View File

@ -44,14 +44,14 @@ public class AnvilListeners implements Listener {
modCost = newOut.getSecond();
}
if(!newOut.getFirst().getType().equals(left.getType())) return; // sketchy hotfix
new EcoBukkitRunnable(player.getTicksLived()) {
@Override
public void onRun() {
int preCost = event.getInventory().getRepairCost();
ItemStack item = newOut.getFirst();
if(!event.getInventory().getItem(0).getType().equals(item.getType())) return;
if(ConfigManager.getConfig().getBool("anvil.rework-cost")) {
int repairCost = RepairCost.getRepairCost(item);
int reworkCount = NumberUtils.log2(repairCost + 1);