Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /ban [<offline player>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
- permission: sk.command.ban
- permission message: &4このコマンドを実行する権限がありません!
- trigger:
- if arg-1 is not set:
- send "&cUsage: /ban <player> never <reason> OR /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-1 has not played before:
- send "&cプレイヤー%arg-1%はログインしたことがありません!"
- else if {ban::%UUID of arg-1%} is 1:
- send "&c%arg-1%は既にBANされています!"
- else if arg-2 is not set:
- send "&cUsage: /ban <player> never <reason> OR /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-2 is not "never" or "temply":
- send "&cUsage: /ban <player> never <reason> OR /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-2 is "never":
- set {ban::%UUID of arg-1%} to 1
- set {bandplayername.%UUID of arg-1%} to "%arg-1%"
- set {banreason.%UUID of arg-1%} to arg-3
- broadcast "&6%player%&eが&6%arg-1%&eをBANしました%nl%&e期限: &7無期限%nl%&e理由: &7%arg-3%"
- kick arg-1 due to "&cあなたはBANされています!%nl%&c期限: &7無期限%nl%&c理由: &7%arg-3%"
- else if arg-2 is "temply":
- if arg-4 is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-5 is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-6 is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if arg-7 is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else:
- set {_days} to arg-4 parsed as integer
- set {_hours} to arg-5 parsed as integer
- set {_minutes} to arg-6 parsed as integer
- set {_seconds} to arg-7 parsed as integer
- set {_total} to {_days}*86400+{_hours}*3600+{_minutes}*60+{_seconds}
- if {_days} is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if {_hours} is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if {_minutes} is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if {_seconds} is not set:
- send "&cUsage: /ban <player> temply <reason> <days> <hours> <minutes> <seconds>"
- else if {_days} > 9999:
- send "&c入力した数値(%arg-4%)は大きすぎます! 9999以下にしてください"
- else if {_hours} > 23:
- send "&c入力した数値(%arg-5%)は大きすぎます! 23以下にしてください"
- else if {_minutes} > 59:
- send "&c入力した数値(%arg-6%)は大きすぎます! 59以下にしてください"
- else if {_seconds} > 59:
- send "&c入力した数値(%arg-7%)は大きすぎます! 59以下にしてください"
- else if {_days} < 0:
- send "&c入力した数値(%arg-4%)は小さすぎます! 0以上にしてください"
- else if {_hours} < 0:
- send "&c入力した数値(%arg-5%)は小さすぎます! 0以上にしてください"
- else if {_minutes} < 0:
- send "&c入力した数値(%arg-6%)は小さすぎます! 0以上にしてください"
- else if {_total} is 0:
- send "&c入力した数値(%arg-7%)は小さすぎます! 1以上にしてください"
- else if {_total} > 0:
- {_seconds} < 0
- send "&c入力した数値(%arg-7%)は小さすぎます! 0以上にしてください"
- stop
- set {ban::%UUID of arg-1%} to 1
- set {bandplayername.%UUID of arg-1%} to "%arg-1%"
- set {banreason.%UUID of arg-1%} to arg-3
- set {unbantime.%UUID of arg-1%} to floor(unix timestamp of now)+{_days}*86400+{_hours}*3600+{_minutes}*60+{_seconds}
- set {_banperiod} to "%{unbantime.%UUID of arg-1%}-floor(unix timestamp of now)%" parsed as integer
- broadcast "&6%player%&eが&6%arg-1%&eをBANしました%nl%&e期限: &7%getPeriodFromSeconds({_banperiod})%%nl%&e理由: &7%arg-3%"
- kick arg-1 due to "&cあなたはBANされています!%nl%&c期限: &7%getPeriodFromSeconds({_banperiod})%%nl%&c理由: &7%arg-3%"
- command /unban [<offline player>] [<text>]:
- aliases: /pardon
- permission: sk.command.ban
- permission message: &4このコマンドを実行する権限がありません!
- trigger:
- if arg-2 is set:
- send "&cUsage: /unban <player>"
- else if arg-1 is not set:
- send "&cUsage: /unban <player>"
- else if arg-1 is set:
- if {ban::%UUID of arg-1%} is not set:
- send "&c%arg-1%はBANされていません!"
- else if {ban::%UUID of arg-1%} is 1:
- delete {ban::%UUID of arg-1%}
- delete {unbantime.%UUID of arg-1%}
- delete {bandplayername.%UUID of arg-1%}
- send "&6%arg-1%&eのBANを解除しました"
- command /banlist:
- permission: sk.command.ban
- permission message: &4このコマンドを実行する権限がありません!
- trigger:
- if {ban::*} is not set:
- send "&cBANされているプレイヤーはいません"
- else if {ban::*} is set:
- loop {ban::*}:
- if {unbantime.%loop-index%} is set:
- set {_banperiod} to "%{unbantime.%loop-index%}-floor(unix timestamp of now)%" parsed as integer
- send "&eプレイヤー: &7%{bandplayername.%loop-index%}% &eUUID: &7%loop-index% &e期限: &7%getPeriodFromSeconds({_banperiod})% &e理由: &7%{banreason.%loop-index%}%"
- else if {unbantime.%loop-index%} is not set:
- send "&eプレイヤー: &7%{bandplayername.%loop-index%}% &eUUID: &7%loop-index% &e期限: &7無期限 &e理由: &7%{banreason.%loop-index%}%"
- on connect:
- {ban::%UUID of player%} is 1
- if {unbantime.%UUID of player%} is set:
- set {_banperiod} to "%{unbantime.%UUID of player%}-floor(unix timestamp of now)%" parsed as integer
- kick player due to "&cあなたはBANされています!%nl%&c期限: &7%getPeriodFromSeconds({_banperiod})%%nl%&c理由: &7%{banreason.%UUID of player%}%"
- else if {unbantime.%UUID of player%} is not set:
- kick player due to "&cあなたはBANされています!%nl%&c期限: &7無期限%nl%&c理由: &7%{banreason.%UUID of player%}%"
- every second:
- loop {ban::*}:
- {unbantime.%loop-index%} <= floor(unix timestamp of now)
- delete {ban::%loop-index%}
- delete {unbantime.%loop-index%}
- delete {bandplayername.%loop-index%}
- on connect:
- {ban::%UUID of player%} is set
- {bandplayername.%UUID of player%} is not "%player%"
- set {bandplayername.%UUID of player%} to "%player%"
- on tab complete:
- set {_splits::*} to split event-string by " "
- if {_splits::1} is "/ban":
- if size of {_splits::*} is 3:
- delete completions
- add "never" and "temply" to completions
- if first 1 characters of {_splits::3} is "t":
- delete completions
- add "temply" to completions
- if first 1 characters of {_splits::3} is "n":
- delete completions
- add "never" to completions
- else if size of {_splits::*} > 3:
- cancel event
- if {_splits::1} is "/unban":
- size of {_splits::*} > 2
- cancel event
- if {_splits::1} is "/banlist":
- size of {_splits::*} > 1
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment