Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Written by IchinoseYuki (Discord:一ノ瀬雪#1027)
- #Request: IY-Core Ver:1.0 or later
- on script load:
- broadcast "&e&l&k|||&9&l[&b&lIchinoseYuki Skript - Sudo&9&l]&e&l&k|||&r &7Ver.1.1"
- command /sudo [<string>]:
- trigger:
- if player doesn't have permission "skript.iy.sudo":
- sender is a player
- send "&4Error: &rYou don't have permission." if {IY::config::%uuid of player%::language} is "en"
- send "&4失敗: &rそのコマンドを使用する権限がありません。" if {IY::config::%uuid of player%::language} is "ja"
- stop
- set {_AG} to arg
- set {_AG::*} to {_AG} split at " "
- set {_PL} to {_AG::1} parsed as player
- if {_AG::2} is not set:
- send "&4Error: &rSpecify argument for command." if {IY::config::%uuid of player%::language} is "en"
- send "&4失敗: &rコマンドの引数を指定してください。" if {IY::config::%uuid of player%::language} is "ja"
- stop
- set {_CM} to last length of arg - length of {_AG::1} + -1 characters of {_AG}
- if {_PL} is not set:
- send "&4Error: &r%{_AG::1}% is offline.%nl%&0: &7/sudo &c&n%{_AG::1}%&7 %{_CM}%" if {IY::config::%uuid of player%::language} is "en"
- send "&4失敗: &r%{_AG::1}%はオフラインです。%nl%&0: &7/sudo &c&n%{_AG::1}%&7 %{_CM}%" if {IY::config::%uuid of player%::language} is "ja"
- stop
- execute {_PL} command "/%{_CM}%"
- send "&aSuccess: &rHave %{_PL}% execute /%{_CM}%." if {IY::config::%uuid of player%::language} is "en"
- send "&a成功: &r%{_PL}%に/%{_CM}%を実行させました。" if {IY::config::%uuid of player%::language} is "ja"
- on tab complete:
- set {_args::*} to substring of event-string from 2 to length of event-string split at " "
- {_args::1} is "sudo"
- if size of {_args::*} is 2:
- loop all players:
- loop-player is not player
- add "%loop-player%" to {_comp::*}
- loop {_comp::*}:
- set {_size} to length of {_args::2}
- if the first {_size} characters of {_args::2} is the first {_size} characters of loop-value:
- add loop-value to completions
- if completions is not set:
- add {_comp::*} to completions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement