Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.
options:
logo: &c&lPunishment &8►&7
function checkBan(p: Player):
if {ban.%{_p}%} is set:
set {_difference} to difference between now and {ban.%{_p}%}
if {_difference} > {ban.%{_p}%.time}:
delete {ban.%{_p}%.time}
delete {ban.%{_p}%.unban}
delete {ban.%{_p}%}
function checkWarnings(p: Player):
if {warnings.%{_p}%.amountActive} >= 1:
loop {warnings.%{_p}%.warnNumber::*}:
set {_difference} to difference between now and {warnings.%{_p}%.warnedAt::%loop-value%}
if {_difference} > {warnings.%{_p}%.duration::%loop-value%}:
delete {warnings.%{_p}%.warnNumber::%loop-value%}
delete {warnings.%{_p}%.warnedAt::%loop-value%}
delete {warnings.%{_p}%.duration::%loop-value%}
remove 1 from {warnings.%{_p}%.amountActive}
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."
command /checkoffenses [<text>]:
aliases: /checkoff
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
send "&8&m &8[ &cOFFENSESES &8]&8&m "
send " "
send "&7User&8: &c%{_t}%"
checkBan({_t})
if {ban.%{_t}%} is set:
send "&7Active Ban&8: &7%{ban.%{_t}%.reason}%"
send "&7Total Ban Length&8: &7%{ban.%{_t}%.time}%"
send "&7Banned At&8: &7%{ban.%{_t}%}%"
send "&7Unban at&8: &7%{ban.%{_t}%.unban}%"
else:
send "&7Active Ban&8: &7None"
checkWarnings({_t})
send "&7Total Warnings&8: &7%{warnings.%{_t}%.amount}%"
if {warnings.%{_t}%.amountActive} >= 1:
send "&7Active Warnings&8: &7%{warnings.%{_t}%.amountActive}%"
else:
send "&7Active Warnings&8: &7None"
send " "
send "&8&m &8[ &cOFFENSESE &8]&8&m "
else:
send "{@logo} The player &c%arg-1% &7is not found."
else:
send "{@logo} You have to give up a &cplayer &7to check it's offenses."
on connect:
if {ban.%player%} is set:
checkBan(player)
if {ban.%player%.time} is set:
kick player due to "BANNED"
if {warnings.%player%.amount} is not set:
set {warnings.%player%.amount} to 0
if {warnings.%player%.amountActive} is not set:
set {warnings.%player%.amountActive} to 0
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:
close player's inventory
send "{@logo} You have warned %{_target}%&7."
send "{@logo} You have been warned." to {_target}
if {warnings.%{_target}%.amount} is not set:
set {warnings.%{_target}%.amount} to 0
add 1 to {warnings.%{_target}%.amount}
add 1 to {warnings.%{_target}%.amountActive}
set {warnings.%{_target}%.warnedAt::%{warnings.%{_target}%.amount}%} to now
set {warnings.%{_target}%.duration::%{warnings.%{_target}%.amount}%} to 10 seconds
set {warnings.%{_target}%.warnNumber::%{warnings.%{_target}%.amount}%} to {warnings.%{_target}%.amount}
else if clicked slot is 20:
set {ban.%{_target}%} to now
set {ban.%{_target}%.unban} to now
set {ban.%{_target}%.time} to 7 seconds
set {ban.%{_target}%.reason} to "&cClient Modifications"
add {ban.%{_target}%.time} to {ban.%{_target}%.unban}
close player's inventory
send "{@logo} You have banned &c%{_target}% &7for &c%{ban.%{_target}%.time}%&7. &8(&c%{ban.%{_target}%.reason}%&8)"
kick {_target} due to "&9&lBANNED%nl%&cClient Modifications%nl%%nl%&7Banned at&8: &7%{ban.%{_target}%}%%nl%&7Unban at&8: &7%{ban.%{_target}%.unban}%"