mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
unit repair done
This commit is contained in:
parent
80468f6add
commit
4195add655
6 changed files with 230 additions and 65 deletions
|
|
@ -31,17 +31,13 @@ object EnchantmentUtil {
|
|||
other.forEach { (enchantment, level) ->
|
||||
// Enchantment not yet in result list
|
||||
if (!containsKey(enchantment)) {
|
||||
if(player.hasPermission(UnsafeEnchants.unsafePermission)){
|
||||
// Add the enchantment if it doesn't have conflicts, or, if player is allowed to bypass enchantment restrictions
|
||||
this[enchantment] = level
|
||||
if(!player.hasPermission(UnsafeEnchants.bypassFusePermission) &&
|
||||
(UnsafeEnchants.conflictManager.isConflicting(this.keys,mat,enchantment) != ConflictType.NO_CONFLICT)){
|
||||
this.remove(enchantment)
|
||||
}
|
||||
}else if(!keys.any { enchantment.conflictsWith(it) }){
|
||||
|
||||
this[enchantment] = level
|
||||
// Add the enchantment if it doesn't have conflicts, or, if player is allowed to bypass enchantment restrictions
|
||||
this[enchantment] = level
|
||||
if(!player.hasPermission(UnsafeEnchants.bypassFusePermission) &&
|
||||
(UnsafeEnchants.conflictManager.isConflicting(this.keys,mat,enchantment) != ConflictType.NO_CONFLICT)){
|
||||
this.remove(enchantment)
|
||||
}
|
||||
|
||||
}
|
||||
// Enchantment already in result list
|
||||
else{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue