Question using /minecraft:clear on enchanted books

Discussion in 'Bukkit Help' started by InfernoRealms, May 26, 2020.

Thread Status:
Not open for further replies.
  1. Offline


    Basically i'm creating a shop and i want to use enchant books as payment. So i need to be able to clear certain enchanted books from a players inventory:

    For example mending book:
    Getting the book:
    /minecraft:give chris_61 enchanted_book{StoredEnchantments:[{id:mending,lvl:1}]} 1
    Clearing the Book from the inventory:
    /minecraft:clear chris_61 minecraft:enchanted_book{StoredEnchantments:[{id:mending,lvl:1}]} 1
    These commands both work but only when use commands to spawn the book. If a normal player were to get a book via whatever means / creative the clear command doesn't work.Example:

    If i get a mending book from creative the clear command no longer works and returns "no items were found on player chris_61"

    From what i can see mending both books are identical (spawned in book and creative book)

    fixed using the following command:

    /minecraft:clear chris_61 minecraft:enchanted_book{StoredEnchantments:[{lvl:1s,id:"minecraft:mending"}]} 1
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 26, 2020
Thread Status:
Not open for further replies.

Share This Page