1
Random question regarding server and books
Heya
In my factions server there is going to be a large ruined city as a warzone, and I want to add random books around the warzone for players to have a quick read (for fun I guess)
Is there anyway I could do that?
More in depth, is there a way to do that without playing being able to get the same book over and over (as if they were spamming a command block that gives books)? We had a commandblock at spawn that would give people the server rules but people abused it to get emeralds from villagers.
tldr:
In my factions server there is going to be a large ruined city as a warzone, and I want to add random books around the warzone for players to have a quick read (for fun I guess)
Is there anyway I could do that?
More in depth, is there a way to do that without playing being able to get the same book over and over (as if they were spamming a command block that gives books)? We had a commandblock at spawn that would give people the server rules but people abused it to get emeralds from villagers.
tldr:
- Need a plugin that allows me to get written books from a sign or bookshelf
- Can't be duped / spammed
2
Easy: use the scoreboard to keep track of who got what. That's what it was made for.
To use the example of your rulebook.. You need a command block and a chain command block:
CB: give @p[tag=!got_rulebook] written_book 1 0 {<stuff>}
CC: scoreboard tag @p add got_rulebook
The CC denotes the chain commandblock which should be set to conditional and always active.
Of course using a function is probably much easier:
CB: execute @p[tag=!got_rulebook] ~ ~ ~ function server:giverulebook
Then, in the function, use this:
give @s written_book 1 0 {<stuff>}
scoreboard tag @s add got_rulebook
This is also how you can keep track of which player got what: use tags for every book and check for them when you give out the goodies.
To use the example of your rulebook.. You need a command block and a chain command block:
CB: give @p[tag=!got_rulebook] written_book 1 0 {<stuff>}
CC: scoreboard tag @p add got_rulebook
The CC denotes the chain commandblock which should be set to conditional and always active.
Of course using a function is probably much easier:
CB: execute @p[tag=!got_rulebook] ~ ~ ~ function server:giverulebook
Then, in the function, use this:
give @s written_book 1 0 {<stuff>}
scoreboard tag @s add got_rulebook
This is also how you can keep track of which player got what: use tags for every book and check for them when you give out the goodies.
Boss shop pro with denizen link.
