Fix level buypass not buypassing merge limit

This commit is contained in:
alexcrea 2024-11-05 01:42:37 +01:00
parent d19cd30ad7
commit 5e098c5118
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
2 changed files with 5 additions and 3 deletions

View file

@ -15,7 +15,7 @@ plugins {
}
group = "xyz.alexcrea"
version = "1.6.7"
version = "1.6.8"
repositories {
// EcoEnchants

View file

@ -86,8 +86,10 @@ object EnchantmentUtil {
// ... and they're the same level
else {
// We test if it is allowed to merge at this level
if(!bypassLevel){
val maxBeforeDisabled = ConfigOptions.maxBeforeMergeDisabled(enchantment)
if((maxBeforeDisabled > 0) && (oldLevel >= maxBeforeDisabled)) return@forEach
}
// Now we increase the enchantment level by 1
var newLevel = oldLevel + 1