command /ban [] []: executable by: players and console trigger: if the sender is a player: if the player isn't an op: send message "&cYou don't have the permission!" to the player stop if the argument 1 isn't set: send message "&7You have to specify a player." to the sender else: if the sender is a player: if the player is the argument 1: send message "&7You can't ban yourself!" to the player stop if the argument 1 didn't played before: send message "&7This player has never joined the server." to the sender else: if {banned.%argument 1%} is true: send message "&7This player is already banned." to the sender else: if {punished.%argument 1%} is true: clear {punished.%argument 1%} clear {punishment.%argument 1%.date} clear {punishment.%argument 1%.time} if {punishment.%argument 1%.reason} is set: clear {punishment.%argument 1%.reason} set {banned.%argument 1%} to true if the argument 2 isn't set: if the argument 1 is online: kick the argument 1 due to "&7You have been banned from the server!" broadcast "&b%argument 1% &7has been banned from the server!" else: set {ban.%argument 1%.reason} to the argument 2 if the argument 1 is online: kick the argument 1 due to "&7You have been banned from the server! Reason: &b%argument 2%&7." broadcast "&b%argument 1% &7has been banned from the server! Reason: &b%argument 2%&7." command /punish [] [] [] []: executable by: players and console trigger: if the sender is a player: if the player isn't an op: send message "&cYou don't have the permission!" to the player stop if the argument 1 isn't set: send message "&7You have to specify a player." to the sender else: if the sender is a player: if the player is the argument 1: send message "&7You can't punish yourself!" to the player stop if the argument 1 didn't played before: send message "&7This player has never joined the server." to the sender else: if {banned.%argument 1%} is true: send message "&7This player is already banned." to the sender else: if {punished.%argument 1%} is true: set {_difference} to difference between now and {punishment.%argument 1%.date} if {_difference} is less than {punishment.%argument 1%.time}: send message "&7This player is already punished." to the sender stop if the argument 2 isn't set: send message "&7You have to specify a duration." to the sender else: set {_time} to "%argument 2% %argument 3%" parsed as timespan if {_time} isn't set: send message "&7You have to specify a valid duration." to the sender else: set {punished.%argument 1%} to true set {punishment.%argument 1%.date} to now set {punishment.%argument 1%.time} to {_time} if the argument 4 isn't set: if the argument 1 is online: kick the argument 1 due to "&7You have been punished from the server! Time: &b%{_time}%&7." broadcast "&b%argument 1% &7has been punished from the server! Time: &b%{_time}%&7." else: set {punishment.%argument 1%.reason} to the argument 4 if the argument 1 is online: kick the argument 1 due to "&7You have been punished from the server! Time: &b%{_time}%&7. Reason: &b%argument 4%&7." broadcast "&b%argument 1% &7has been punished from the server! Time: &b%{_time}%&7. Reason: &b%argument 4%&7." command /pardon [] []: executable by: players and console trigger: if the sender is a player: if the player isn't an op: send message "&cYou don't have the permission!" to the player stop if the argument 1 isn't set: send message "&7You have to specify a player." to the sender else: if the sender is a player: if the player is the argument 1: send message "&7You can't pardon yourself..." to the player stop if {banned.%argument 1%} isn't set: if {punished.%argument 1%} isn't set: send message "&7This player is neither banned nor punished." to the sender stop else: set {_difference} to difference between now and {punishment.%argument 1%.date} if {_difference} is more than {punishment.%argument 1%.time}: send message "&7This player is neither banned nor punished." to the sender stop if {banned.%argument 1%} is true: clear {banned.%argument 1%} if {ban.%argument 1%.reason} is set: clear {ban.%argument 1%.reason} else: clear {punished.%argument 1%} clear {punishment.%argument 1%.date} clear {punishment.%argument 1%.time} if {punishment.%argument 1%.reason} is set: clear {punishment.%argument 1%.reason} broadcast "&b%argument 1% &7has been pardoned!" on connect: if {banned.%player%} is true: if {ban.%player%.reason} isn't set: kick the player due to "&7You have been banned from the server!" else: kick the player due to "&7You have been banned from the server! Reason: &b%{ban.%player%.reason}%&7." else if {punished.%player%} is true: set {_difference} to difference between now and {punishment.%player%.date} if {_difference} is less than {punishment.%player%.time}: set {_remaining.time} to difference between {_difference} and {punishment.%player%.time} if {punishment.%player%.reason} isn't set: kick the player due to "&7You have been punished from the server! Remaining time: &b%{_remaining.time}%&7." else: kick the player due to "&7You have been punished from the server! Remaining time: &b%{_remaining.time}%&7. Reason: &b%{punishment.%player%.reason}%&7."