I need to make it so players can report other players who curse or other bad stuff. So I would start with:
/scoreboard objectives add report trigger
Then people type to report:
/trigger report set 1
But then how would I put this in? Ideally, they would be kicked:
/kick @a[score_report_min=1] {text:"You have been reported and kicked"}
this did not work! Am I doing something wrong? What can I do?
Best Answer
This might do what you want just in a different way. (This I did in 1.8) You could give everyone a book with a command. This could /tp them to a room. Under the floor of the room hide these commands connected to a clock of your choice(I used a hopper clock).
/testfor @p[r=10]
This will test for a player within a radius of 10. If a player is within the radius a comparator will activate this command./give @p minecraft:writable_book
Have them write what they want to report in their book and place it in a trapped chest, connected to a hopper that places the item in a larger chest. Then have them push a button to report. .The report button should have 2 command blocks hidden behind it, one that clones the chest under the hopper to another room, and another that tells the player the report was sent/say @p Report Filed
. This is optional, but if you wanted to you could have a tellraw command that tells the owner of the world when someone is reported./tellraw (name) Someone has been reported
it would look something like this: .You could then go to the room where the chest was cloned and read the reports, but you would have to kick or suspend the players yourself.https://www.minecraftjson.com/