Better Reports - Every report is logged in a GUI. Which can be cleared easily. This script is easy to edit.
48 lines of script. So I'd say it's very light weight, Shouldn't lag your server.
Permissions
staff - This player will be alerted when a report is made. Basically my permission node for the staff team.
Pictures
These ar e the messages sent to players and the player with the permission "staff"
Once you execute the command /reports (Only players with the permission "staff" has access). This will show up, and once you hover it, It'll show the player who reported the player, and it's reason.
On the bottom-right corner, You'll see an empty map called Clear Reports... It's pretty much self-explanatory but, Once you click it, It'll delete all the reports and refresh the GUI.
Everytime the GUI is empty, this will show up. This will also show up once you've cleared all the reports.
Script (48 lines):
options:
prefix: &3[Reports]
staff: staff
no-perm: &cNo permission.
gui-name: &3Reports &lGUI
command /report [<offline player>] [<text>]:
trigger:
if arg 1 is set:
if arg 2 is set:
add arg-1 to {reports::players::*}
set {reports::reason::%arg-1%} to arg 2
set {reports::reporter::%arg-1%} to player
send "{@prefix} &7Sucessfully reported &e%arg-1% &7for &e%arg-2%&7."
send "{@prefix} &7A new file has been made against &e%arg-1%&7. Check /reports." to all players where [input has permission "staff"]
else:
send "{@prefix} &7Please provide a reason."
else:
send "{@prefix} &7Please provide a player."
command /reports [<text>]:
permission: {@staff}
permission message: {@no-perm}
trigger:
send "{@prefix} &7Opening the report gui..."
wait 1 tick
reports(player)
function reports(p: player):
open virtual chest inventory with size 6 named "{@gui-name}" to {_p}
set {_n} to 0
if {reports::players::*} is set:
loop {reports::players::*}:
format gui slot {_n} of {_p} with ("%loop-value%" parsed as offline player)'s skull with no nbt named "&3%loop-value%" with lore "&7Reason&8: &3%{reports::reason::%loop-value%}%" and "&7Reporter&8: &3%{reports::reporter::%loop-value%}%"
add 1 to {_n}
if {_n} = 53:
stop loop
else:
format gui slot 0 of {_p} with paper with no nbt named "&7None." with lore "&7Currently no reports." to do nothing
format gui slot 53 of {_p} with empty map with no nbt named "&6Clear Reports" to run:
close player's inventory
loop {reports::players::*}:
delete {reports::reason::%loop-value%}
delete {reports::reporter::%loop-value%}
wait 1 tick
clear {reports::players::*}
reports({_p})
ENJOY! Thank you for reading!