Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on load:
- broadcast "&e[&6TSReports&e] &aCreated by ReportCards!"
- loop all players:
- if loop-player has permission "staff":
- send "&e[&6Reports&e] &aThanks for using Reports!" to loop-player
- send "&e[&6Reports&e] &aUse /reports to list all the active reports!" to loop-player
- on join:
- if {%player%.new} is not set:
- add "%player%" to {joined::*}
- set {%player%.new} to false
- command /report [<player>] [<text>]:
- aliases: /rp
- trigger:
- if {%player%.report} is not set:
- set {%player%.report} to false
- if arg 1 is not set:
- send "&aEnter a player name!"
- else if arg 2 is not set:
- send "&aEnter a reason!"
- else:
- if {%player%.report} is true:
- send "&eYou currently have a active report!"
- else:
- set {%player%.reason} to "&7%arg 2%"
- add "%player%" to {reports::*}
- set {%player%.report} to true
- set {%player%.reported} to "%arg 1%"
- send "&eSetting up report!"
- wait 10 ticks
- send "&eReport filed!"
- send "&e[&6Reports&e] &aReport filed against: &e%arg 1%"
- send "&e[&6Reports&e] &aReason:%nl%&b%arg 2%"
- send " "
- send "&cAbuse of this command can lead to a punishment!"
- loop all players:
- if loop-player has permission "reports.staff":
- send "&e%player% filed a new report!" to loop-player
- send "&e[&6Reports&e] &a%player% filed a report against: &e%arg 1%" to loop-player
- send "&e[&6Reports&e] &aReason:%nl%&b%arg 2%" to loop-player
- command /reports:
- permission: reports.staff
- aliases: /reps
- trigger:
- open chest with 4 rows named "&cReports" to player
- format slot 35 of player with barrier named "&7" with lore "&eClick to close the menu." to close
- if player has permission "reports.op":
- format slot 34 of player with grass named "&cClear all reports" to run [execute player command "/clearreports"]
- else:
- format slot 34 of player with dirt named "&cClear all reports" with lore "&4No permission!" to close
- set {_slot} to 0
- loop {reports::*}:
- format slot {_slot} of player with bedrock named "&e%{%loop-value%.reported}%" with lore "&eReported By:||%loop-value%||&aFor Reason:||&7%{%loop-value%.reason}%|| ||&eClick to answer report." to close then run [execute player command "/answerreport %loop-value%"]
- set {_slot} to {_slot} + 1
- command /answerreport [<player>]:
- permission: reports.staff
- aliases: /ar
- trigger:
- loop {joined::*}:
- if loop-value is arg-1:
- if {%arg 1%.report} is true:
- set {%player%.answering} to true
- set {%player%.answp} to arg-1
- send "&eType what you want to answer!"
- else:
- send "&cThis player does not have a active report"
- command /clearreports:
- permission: reports.op
- trigger:
- send "&e[&6Reports&e] &aClearing all reports, keep in mind this may lag!"
- wait 5 ticks
- send "&e[&6Reports&e] &aRemoved all reports!"
- loop {joined::*}:
- set {%loop-value%.report} to false
- remove "%loop-value%" from {reports::*}
- on chat:
- if {%player%.answering} is true:
- send "&8Answering the report with: &7%message%"
- send "&7%player% &8has answered your report!" to {%player%.answp}
- send "&8Answer: &7%message%" to {%player%.answp}
- add "%{%player%.answp}%" to {answering::*}
- loop {answering::*}:
- set {%loop-value%.lastanswer} to "%message%"
- set {%loop-value%.lastanswerp} to "%player%"
- set {%loop-value%.report} to false
- set {%player%.answering} to false
- remove "%{%player%.answp}%" from {reports::*}
- clear {answering::*}
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment