mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Fixed duplication glitch
This commit is contained in:
parent
2401a49efb
commit
4c441dacfc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user