options: Sciezka-Config: UlanyBans/Config.yml Config-Bans: UlanyBans/Bans.yml on load: if yaml value "Wiadomosc" from file "{@Sciezka-Config}" is not set: set yaml value "Wiadomosc" from file "{@Sciezka-Config}" to "&7Gracz: &a{BANNED} &7Zostal zbanowany permamentnie przez: &c{PLAYER}" add "&8==========" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&cZostales Zbanowany Pernamentnie" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&cTwoj nick: &7{B-NAME}" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&cZbanowal: &7{E-NAME}" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&cData: &7{NOW}" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&cWygasa: &7Nigdy" to yaml list "Linijki" from file "{@Sciezka-Config}" add "&8==========" to yaml list "Linijki" from file "{@Sciezka-Config}" set {BANS::CONFIG::MESSAGE} to yaml value "Wiadomosc" from file "{@Sciezka-Config}" set {BANS::CONFIG::LINIES::*} to yaml list "Linijki" from file "{@Sciezka-Config}" loop {BANS::CONFIG::LINIES::*}: set {BANS::CONFIG::LINIES::%loop-index%} to colored loop-value send "&4Zaladowano skypt na bany" to console command /ban [] [] []: permission: Ban permission message: &7Nie masz uprawnien! trigger: if arg 1 has permission "Ban": send "&7Nie mozesz zbanowac &a%arg 1%!" send "&7Admin &a%player% &7Chcial cie zbanowac!" stop else: if arg 1 is set: if arg 3 is set: set {_r} to arg 3 else: set {_r} to "&4BRAK" if arg 2 is set: if arg 2 is "all" or "*": set {_t} to "&4NIGDY" else: set {_t} to arg 2 set {_ti} to 0 if arg 2 contains "m": replace all "m" with "" in {_t} loop ({_t} parsed as number) times: add 60 to {_ti} if arg 2 contains "s": replace all "s" with "" in {_t} loop ({_t} parsed as number) times: add 1 to {_ti} if arg 2 contains "h": replace all "h" with "" in {_t} loop ({_t} parsed as number) times: add 60*60 to {_ti} if arg 2 contains "d": replace all "d" with "" in {_t} loop ({_t} parsed as number) times: add 60*60*60*24 to {_ti} else: set {_t} to "&4NIGDY" set {_text} to "" loop {BANS::CONFIG::LINIES::*}: set {_g} to loop-value replace all "{B-NAME}" with name of arg 1 in {_g} replace all "{E-NAME}" with "%executor%" in {_g} replace all "{NOW}" with "%now%" in {_g} replace all "{REASON}" with "%colored {_r}%" in {_g} if {_ti} is set: replace all "{TIME}" with "%{_ti}% s" in {_g} else: replace all "{TIME}" with "%{_t}%" in {_g} set {_text} to "%{_text}%%{_g}%%nl%" kick arg 1 due to "%colored {_text}%" set {_g} to {BANS::CONFIG::MESSAGE} replace all "{B-NAME}" with name of arg 1 in {_g} replace all "{E-NAME}" with name of player in {_g} broadcast "%colored {_g}%" add name of arg 1 to yaml list "Bans" from file "{@Config-Bans}" set yaml value "Ban.User.%arg 1%.UUID" from file "{@Config-Bans}" to uuid of arg 1 set yaml value "Ban.User.%arg 1%.IP" from file "{@Config-Bans}" to ip of arg 1 set yaml value "Ban.User.%arg 1%.Reason" from file "{@Config-Bans}" to {_r} set yaml value "Ban.User.%arg 1%.Executor" from file "{@Config-Bans}" to name of player set yaml value "Ban.User.%arg 1%.Nick" from file "{@Config-Bans}" to name of arg 1 set yaml value "Ban.User.%arg 1%.Date" from file "{@Config-Bans}" to "%now%" set yaml value "Ban.User.%arg 1%.Time" from file "{@Config-Bans}" to {_ti} every 2 second: set {BANS::LIST::*} to yaml list "Bans" from file "{@Config-Bans}" loop {BANS::LIST::*}: if yaml value "Ban.User.%loop-value%.Time" from file "{@Config-Bans}" is set: if yaml value "Ban.User.%loop-value%.Time" from file "{@Config-Bans}" > 1: set {_t} to yaml value "Ban.User.%loop-value%.Time" from file "{@Config-Bans}" set yaml value "Ban.User.%loop-value%.Time" from file "{@Config-Bans}" to {_t}-2 else: remove loop-value from yaml list "Bans" from file "{@Config-Bans}" remove loop-value from {BANS::LIST::*} delete yaml value "Ban.User.%loop-value%" from file "{@Config-Bans}" on join: if yaml value "Ban.User.%name of player%.Nick" from file "{@Config-Bans}" is set: set {_t} to yaml value "Ban.User.%name of player%.Time" from file "{@Config-Bans}" set {_np} to yaml value "Ban.User.%name of player%.Executor" from file "{@Config-Bans}" set {_d} to yaml value "Ban.User.%name of player%.Date" from file "{@Config-Bans}" set {_r} to yaml value "Ban.User.%name of player%.Reason" from file "{@Config-Bans}" set {_text} to "" loop {BANS::CONFIG::LINIES::*}: set {_g} to loop-value replace all "{B-NAME}" with name of player in {_g} replace all "{E-NAME}" with "%{_np}%" in {_g} replace all "{NOW}" with "%{_d}%" in {_g} replace all "{REASON}" with "%colored {_r}%" in {_g} if {_t} is set: replace all "{TIME}" with "%{_t}% s" in {_g} else: replace all "{TIME}" with "&4NIGDY" in {_g} set {_text} to "%{_text}%%{_g}%%nl%" kick player due to "%colored {_text}%" command /unban []: permission: ban permission message: &7Nie masz uprawnien! trigger: if yaml value "Ban.User.%arg 1%.Nick" from file "{@Config-Bans}" is set: remove arg 1 from yaml list "Bans" from file "{@Config-Bans}" remove arg 1 from {BANS::LIST::*} delete yaml value "Ban.User.%arg 1%" from file "{@Config-Bans}" send "&7Odbanowales &a%arg 1%" else: send "&7Ten gracz nie ma bana!"