Fixed level-clamp removing the enchantment rather than clamping it
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package com.willfp.ecoenchants;
|
||||
|
||||
import com.willfp.eco.core.AbstractPacketAdapter;
|
||||
import com.willfp.eco.core.EcoPlugin;
|
||||
import com.willfp.eco.core.command.AbstractCommand;
|
||||
import com.willfp.eco.core.display.DisplayModule;
|
||||
|
||||
@@ -288,6 +288,7 @@ public class ItemConversions extends PluginDependent implements Listener {
|
||||
new HashMap<>(meta.getEnchants()).forEach((enchantment, integer) -> {
|
||||
if (integer > enchantment.getMaxLevel()) {
|
||||
meta.removeEnchant(enchantment);
|
||||
meta.addEnchant(enchantment, enchantment.getMaxLevel(), true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user