Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # BY @ADXM#1343
- #
- # REQUIRED: Skript, Sk-Bee
- # Without these, it will not work!
- options:
- max-warns: 3
- P: &c[WarnGUI]&7
- command /warn [<player>] [<text>]:
- trigger:
- if arg-1 is set:
- if arg-2 is set:
- add 1 to {warn-count::%arg-1's uuid%}
- add arg-2 to {warns::%arg-1's uuid%::*}
- set {warns::time::%arg-1's uuid%::%arg-2%} to time
- set {warns::staff::%arg-1's uuid%::%arg-2%} to player
- log "%arg-1% has been warned by %player% for %arg-2%" to "WarnGUI"
- send "{@P} &3%arg-1%&7 has been warned for &3%arg-2%&7." to player
- send "{@P} You have been warned for &3%arg-2%&7." to arg-1
- if {warn-count::%arg-1's uuid%} = {@max-warns}:
- set {warn-count::%arg-1's uuid%} to 0
- send "{@P} &3%arg-1%&7 has been kicked for reaching their maximum warnings &3({@max-warns})&7." to player
- kick arg-1 due to "{@P} You have reached your maximum warnings."
- else:
- send "{@P} Usage: /warn [player] [reason]"
- else:
- send "{@P} Usage: /warn [player] [reason]"
- command /history [<player>]:
- trigger:
- if arg-1 is set:
- if {warns::%arg-1's uuid%::*} is set:
- set {gui::%player's uuid%} to arg-1
- set {_inventory} to chest inventory with 5 rows named "{@P} &3%arg-1%&8's history"
- set slot 44 of {_inventory} to barrier named "&3RESET PLAYERS HISTORY" with lore "&7&oClick to completely reset this player's history."
- set {_slot} to -1
- loop {warns::%arg-1's uuid%::*}:
- add 1 to {_slot}
- if {_slot} != 44:
- set slot {_slot} of {_inventory} to oak sign named "&7REASON: &3%loop-value%" with lore "&7STAFF MEMBER: &3%{warns::staff::%arg-1's uuid%::%loop-value%}%" and "&7TIME: &3%{warns::time::%arg-1's uuid%::%loop-value%}%"
- open {_inventory} to player
- else:
- send "{@P} This user has no history."
- else:
- send "{@P} Usage: /history [player]"
- on inventory click:
- if custom name of player's current inventory is "{@P} &3%{gui::%player's uuid%}%&8's history":
- cancel event
- if clicked slot is 44:
- set {_U} to {gui::%player's uuid%}'s uuid
- clear {warns::%{_U}%::*}
- set {warn-count::%{_U}%} to 0
- send "{@P} Cleared &3%{gui::%player's uuid%}%&7's history!"
- close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment