mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Fixed level-clamp removing the enchantment rather than clamping it
This commit is contained in:
parent
b65ecc4e29
commit
8abd254270
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user