mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
fix strange level price for book.
This commit is contained in:
parent
b594b1fb0c
commit
6133419499
1 changed files with 5 additions and 1 deletions
|
|
@ -57,11 +57,15 @@ class AnvilEventListener : Listener {
|
|||
resultItem.itemMeta = it
|
||||
}
|
||||
resultItem.setEnchantmentsUnsafe(newEnchants)
|
||||
var repairCost: Int
|
||||
if (!first.isBook() && !second.isBook()) {
|
||||
repairCost = first.repairCost + second.repairCost
|
||||
// we only need to be concerned with repair when neither item is a book
|
||||
resultItem.repairFrom(first, second)
|
||||
}else{
|
||||
repairCost = resultItem.repairCost
|
||||
}
|
||||
var repairCost = first.repairCost + second.repairCost
|
||||
|
||||
if (ConfigOptions.limitRepairCost) {
|
||||
repairCost = min(repairCost, ConfigOptions.limitRepairValue)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue