What is an enchanted book?
According to the Minecraft Wiki, an enchanted book is an item which allows players to add enchantments to weapons, tools, or armor by combining the enchantment book with one of said items on an anvil.
Can they receive any enchantment?
Testing in creative and survival mode shows that books can receive any enchantment that a normal weapon/armor/tool/other can receive. An easy way to check is to go into creative mode and use the new search function to search for the term book. This will show you what all the enchanted books are.
Can they receive more than one enchantment?
According to the wiki, books may only have one enchantment. This can be tested by giving yourself a bunch of books and enchanting them, then throwing them into lava or whatever you wish to do with them.
Since enchantments have different chances of occurring for different tools, materials, and at different levels, how are those probabilities different for books?
This would be different for books since books are not diamond swords. However, this would have that many variables because unlike a sword, books can only be made from paper. Swords can be made from diamonds, iron, and other materials. You would have to test this to truly know, but if John tells us how many levels he invested into his enchanted books, we might be able to know. Right now, though, it appears that the enchantment gives you the highest level (ex. Protection IV, Sharpness IV, etc.)
First of all, let's talk about the mistake you are making:
Your testfor
command output will be permanently on, as long as there is at least one player with 30 to 49 levels, meaning the scoreboard command will only be run if there was no player in that range and then there is.
Secondly, @p[something]
will always target the player nearest to the execution position that qualifies for "something". You'll need to use @a
in the team join command.
That said, lucky for you the testfor
is completely unnecessary*. scoreboard
can do the job perfectly fine on it's own.
/scoreboard teams join (team) @a[lm=30,l=49,team=!(team)]
The latter part of the command prevents people from being added to the same team multiple times. If there is no-one in that level range (or all of them are assigned a team already), the command will simply not add anyone to the team.
* In most cases, execute
is strictly better than testfor
Best Answer
Enchanted books store the enchantments that they're going to pass onto other items slightly differently than normal enchantments actually on an item. Otherwise, the enchantments on the book intended for passing on would be usable (set mobs on fire with a fire aspect book, or get more loot with a fortune book).
Rather than the
ench
list, the pass-on enchantments are in aStoredEnchantments
list, everything else is the same.For 1.13+:
For previous versions: