mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
allow enchanted book for super enchant
This commit is contained in:
parent
37e8ca7da9
commit
eb2e7b3abb
2 changed files with 4 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
version = "1.17.4"
|
version = "1.17.5"
|
||||||
|
|
||||||
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
|
val isDevBuild = System.getenv("SMALL_COMMIT_HASH") != null
|
||||||
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"
|
val isPreRelease = System.getenv("IS_GITHUB_PRERELEASE") == "true"
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.maddoxh.superEnchants.enchants.EnchantManager;
|
||||||
import com.maddoxh.superEnchants.items.EnchantApplicator;
|
import com.maddoxh.superEnchants.items.EnchantApplicator;
|
||||||
import com.maddoxh.superEnchants.items.EnchantReader;
|
import com.maddoxh.superEnchants.items.EnchantReader;
|
||||||
import com.maddoxh.superEnchants.util.ConflictChecker;
|
import com.maddoxh.superEnchants.util.ConflictChecker;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.NamespacedKey;
|
import org.bukkit.NamespacedKey;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
|
|
@ -68,6 +69,8 @@ public class CASuperEnchantEnchantment extends CAEnchantmentBase implements Addi
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemConflict(@NotNull Map<CAEnchantment, Integer> enchantments, @NotNull NamespacedKey itemType, @NotNull ItemStack item) {
|
public boolean isItemConflict(@NotNull Map<CAEnchantment, Integer> enchantments, @NotNull NamespacedKey itemType, @NotNull ItemStack item) {
|
||||||
|
if(Material.ENCHANTED_BOOK.equals(item.getType())) return false;
|
||||||
|
|
||||||
return !enchant.canApplyTo(item.getType());
|
return !enchant.canApplyTo(item.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue