Skip to content

Commit

Permalink
Fix level buypass not buypassing merge limit
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrea committed Nov 5, 2024
1 parent d19cd30 commit 5e098c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
}

group = "xyz.alexcrea"
version = "1.6.7"
version = "1.6.8"

repositories {
// EcoEnchants
Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/io/delilaheve/util/EnchantmentUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ object EnchantmentUtil {
// ... and they're the same level
else {
// We test if it is allowed to merge at this level
val maxBeforeDisabled = ConfigOptions.maxBeforeMergeDisabled(enchantment)
if((maxBeforeDisabled > 0) && (oldLevel >= maxBeforeDisabled)) return@forEach
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
Expand Down

0 comments on commit 5e098c5

Please sign in to comment.