Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- logo: &c&lPunishment &8►&7
- command /punish [<text>]:
- aliases: /pu
- trigger:
- if player has permission "rank.helper":
- if arg-1 is set:
- if arg-1 parsed as a player is set:
- set {_t} to arg-1 parsed as a player
- open chest with 6 rows named "Punish %{_t}%" to player
- set slot 19 of player's current inventory to paper named "&aWarn" with lore "", "&7Click to Warn %{_t}%", "" and "&8(&2Helper&8)"
- set slot 20 of player's current inventory to stone sword named "&cClient Modifications" with lore "", "&7Click to Ban %{_t}%", "&7for &oClient Modifications", "" and "&8(&2Helper&8)" without any NBT
- else:
- send "{@logo} The player &c%arg-1% &7is not found."
- else:
- send "{@logo} You have to give up a &cplayer &7to punish."
- on connect:
- if {ban.%player%} is set:
- set {_difference} to difference between now and {ban.%player%}
- if {_difference} > {ban.%player%.time}:
- delete {ban.%player%.time}
- delete {ban.%player%}
- else:
- kick player due to "BANNED"
- on quit:
- if {ban.%player%} is set:
- set quit message to ""
- on inventory click:
- if type of clicked inventory is chest inventory:
- if inventory name of player's current inventory starts with "Punish ":
- cancel event
- set {_name::*} to inventory name of player's current inventory split at " "
- set {_target} to {_name::2}
- set {_target} to {_target} parsed as an offline player
- if clicked slot is 19:
- else if clicked slot is 20:
- set {ban.%{_target}%} to now
- set {ban.%{_target}%.time} to 7 seconds
- set {ban.%{_target}%.unban} to now
- kick {_target} due to "&9&lBANNED%nl%%nl%&7Banned at&8: &7%{ban.%{_target}%}%%nl%&7Unban at&8: &7%add {ban.%{_target}%.time} to {ban.%{_target}%}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement