1

Random question regarding server and books

RainOfPain125 •1/5/18 1:20 am
•
158
•
1/7/2018 6:38 am
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:
  • Need a plugin that allows me to get written books from a sign or bookshelf
  • Can't be duped / spammed
Posted by
RainOfPain125
Level 5 : Apprentice Network
0

  Have something to say?

Join • Sign in

2

ShelLuser
• 01/07/2018 6:38 am
He/Him • Level 61 : High Grandmaster Senpai
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.
1
ieryana
• 01/05/2018 1:16 pm
• Level 36 : Artisan Princess
Boss shop pro with denizen link.
1

Welcome