So, I'm messing around with enchantments, and when a player uses my custom things, and doesn't roll a custom enchantment, they get one of the vanilla ench books, the problem is when the vanilla enchantment book is given to them, you can't use it in an anvil! anyone know how to fix this.
[doublepost=1502134472,1502134224][/doublepost]edit: the code works, but how do you make it so the vanilla books can be used in an anvil?
code_language.skript:
command /cosmeticgive <player>:
permission: xc.cosmeticgive
trigger:
if arg-1 is set:
give arg-1 1 enchanted_book named "&d&lMystery Book" with lore "&7Contains a random enchantment book!"
on rightclick:
player is holding enchanted_book named "&d&lMystery Book" with lore "&7Contains a random enchantment book!"
remove 1 enchanted_book named "&d&lMystery Book" with lore "&7Contains a random enchantment book!" from the player
wait 1 second
chance of 100%
set {enchbook} to a random integer between 1 and 4
if {enchbook} is 1:
give player 1 of enchanted_book of Protection 1
if {enchbook} is 2:
give player 1 of enchanted_book of Protection 2
if {enchbook} is 3:
give player 1 of enchanted_book of Protection 3
if {enchbook} is 4:
give player 1 of enchanted_book of Protection 4