on script load: if folder "plugins/Sban" doesn't exists: create folder "plugins/Sban" if folder "plugins/Sban/banList" doesn't exists: create folder "plugins/Sban/banList" if file "plugins/Sban/config.yml" doesn't exists: create file "plugins/Sban/config.yml" set "info.prefix" to "&7[&aSB&7]" in yml file "plugins/Sban/config.yml" set "info.prefixON" to "true" in yml file "plugins/Sban/config.yml" set "messages.banMsg" to "" in yml file "plugins/Sban/config.yml" set "messages.tempMsg" to "" in yml file "plugins/Sban/config.yml" set {_prefixOn} to single value "info.prefixON" get of "plugins/Sban/config.yml" if {_prefixOn} is "true": set {sban::properties::prefix} to single value "info.prefix" get of "plugins/Sban/config.yml" replace all "[lightred]" with "&c" in {sban::properties::prefix} replace all "[red]" with "&4" in {sban::properties::prefix} replace all "[white]" with "&f" in {sban::properties::prefix} replace all "[aqua]" with "&b" in {sban::properties::prefix} replace all "[lightgreen]" with "&a" in {sban::properties::prefix} replace all "[bold]" with "&l" in {sban::properties::prefix} replace all "[italic]" with "&o" in {sban::properties::prefix} replace all "[black]" with "&0" in {sban::properties::prefix} replace all "[green]" with "&2" in {sban::properties::prefix} replace all "[yellow]" with "&6" in {sban::properties::prefix} replace all "[lightyellow]" with "&e" in {sban::properties::prefix} replace all "[gray]" with "&8" in {sban::properties::prefix} replace all "[lightgray]" with "&7" in {sban::properties::prefix} replace all "[darkblue]" with "&1" in {sban::properties::prefix} else: if {sban::properties::prefix} is set: delete {sban::properties::prefix} command /zbanuj [] []: trigger: if sender has permission "sban.zbanuj": if arg 1 is set: if arg 2 is set: if file "plugins/Sban/banList/%arg 1%.yml" doesn't exists: if arg 1 is online: set {_banned} to player if sender is console: set {_banned} to "CONSOLE" create file "plugins/Sban/banList/%arg 1%.yml" set "info.type" to "PERM" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.date" to "%now%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.admin" to "%{_banned}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.reason" to "%arg 2%" in yml file "plugins/Sban/banList/%arg 1%.yml" set {_banMsg} to value "messages.banMsg" get of "plugins/Sban/config.yml" replace all "[player]" with "%arg 1%" in {_banMsg} replace all "[type]" with "PERM" in {_banMsg} replace all "[admin]" with "%{_banned}%" in {_banMsg} replace all "[reason]" with "%arg 2%" in {_banMsg} replace all "[date]" with "%now%" in {_banMsg} replace all "[nl]" with "%nl%" in {_banMsg} replace all "[lightred]" with "&c" in {_banMsg} replace all "[red]" with "&4" in {_banMsg} replace all "[white]" with "&f" in {_banMsg} replace all "[aqua]" with "&b" in {_banMsg} replace all "[lightgreen]" with "&a" in {_banMsg} replace all "[bold]" with "&l" in {_banMsg} replace all "[italic]" with "&o" in {_banMsg} replace all "[black]" with "&0" in {_banMsg} replace all "[green]" with "&2" in {_banMsg} replace all "[yellow]" with "&6" in {_banMsg} replace all "[lightyellow]" with "&e" in {_banMsg} replace all "[gray]" with "&8" in {_banMsg} replace all "[lightgray]" with "&7" in {_banMsg} replace all "[darkblue]" with "&1" in {_banMsg} kick arg 1 due to "%{_banMsg}%" broadcast "%{sban::properties::prefix}% &a&lGracz &c%arg 1% &a&lzostal pernamentnie zbanowany przez &c%{_banned}% &a&lza &6%arg 2% &a&l!" stop else: set {_banned} to player if sender is console: set {_banned} to "CONSOLE" create file "plugins/Sban/banList/%arg 1%.yml" set "info.type" to "PERM" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.date" to "%now%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.admin" to "%{_banned}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.reason" to "%arg 2%" in yml file "plugins/Sban/banList/%arg 1%.yml" broadcast "%{sban::properties::prefix}% &a&lGracz &7[&4&lOFFLINE&7] &c%arg 1% &a&lzostal pernamentnie zbanowany przez &c%{_banned}% &a&lza &6%arg 2% &a&l!" stop else: send "%{sban::properties::prefix}% &a&lTen gracz jest juz zbanowany!" stop else: send "%{sban::properties::prefix}% &c&lPodaj powod!" stop else: send "%{sban::properties::prefix}% &c&lPodaj nick gracza!" stop else: send "%{sban::properties::prefix}% &c&lBrak uprawnien! &7(sban.zbanuj)" stop command /checkban []: trigger: if sender has permission "sban.checkban": if arg 1 is set: if file "plugins/Sban/banList/%arg 1%.yml" exists: send "%{sban::properties::prefix}% &7[&6&l%arg 1%&7] &a&lTen gracz &c&lma &a&lbana!" stop else: send "%{sban::properties::prefix}% &7[&6&l%arg 1%&7] &a&lTen gracz &c&lnie ma &a&lbana!" stop else: send "%{sban::properties::prefix}% &c&lPodaj nick!" stop else: send "%{sban::properties::prefix}% &c&lBrak uprawnien &7(sban.checkban)" stop command /sban: trigger: if sender has permission "sban.help": open chest with 2 rows named "&6&lSBanHelp" to player set player's current inventory's slot 0 to book named "&a&l/zbanuj [nick] [powod]" with lore "&7>> &cBanujesz gracza na zawsze." set player's current inventory's slot 9 to paper named "&a&lPermisja: &7sban.zbanuj" with lore "&7>> &cTa permisja pozwala na banowanie pernamentne." set player's current inventory's slot 1 to book named "&a&l/temp [nick] [powod] [czas]" with lore "&7>> &cBanujesz gracza na okreslony czas." set player's current inventory's slot 10 to paper named "&a&lPermisja: &7sban.temp" with lore "&7>> &cTa permisja pozwala na banowanie tymczasowe." set player's current inventory's slot 2 to book named "&a&l/wykop [nick] [powod]" with lore "&7>> &cWyrzucasz gracza z serwera." set player's current inventory's slot 11 to paper named "&a&lPermisja: &7sban.wykop" with lore "&7>> &cTa permisja pozwala na wyrzucanie gracza." set player's current inventory's slot 3 to book named "&a&l/odbanuj [nick]" with lore "&7>> &cOdbanowywujesz gracza." set player's current inventory's slot 12 to paper named "&a&lPermisja: &7sban.odbanuj" with lore "&7>> &cTa permisja pozwala na odbanowanie gracza." set player's current inventory's slot 4 to book named "&a&l/sbpanel [nick]" with lore "&7>> &cOtwiera panel do zarzadzania graczem." set player's current inventory's slot 13 to paper named "&a&lPermisja: &7sban.panel" with lore "&7>> &cTa permisja pozwala na banowanie tymczasowe" set player's current inventory's slot 5 to book named "&a&l/checkban [nick]" with lore "&7>> &cSprawdzasz czy gracz ma bana." set player's current inventory's slot 14 to paper named "&a&lPermisja: &7sban.checkban" with lore "&7>> &cTa permisja pozwala na sprawdzania banow." set player's current inventory's slot 6 to black stained glass pane named "" with lore "" set player's current inventory's slot 15 to black stained glass pane named "" with lore "" set player's current inventory's slot 17 to tnt named "&4&lWYJDZ" with lore "" set player's current inventory's slot 8 to book named "&a&lFormaty czasu" with lore "&7>> &6x seconds &c- x sekund||&7>> &6x minutes &c- x minut||&7>> &6x hours &c- x godzin||&7>> &6x days &c- x dni" else: send "%{sban::properties::prefix}% &c&lBrak uprawnien &7(sban.help)" stop command /odbanuj []: trigger: if sender has permission "sban.odbanuj": if arg 1 is set: if file "plugins/Sban/banList/%arg 1%.yml" exists: set {_banned} to player if sender is console: set {_banned} to "CONSOLE" delete file "plugins/Sban/banList/%arg 1%.yml" delete {sban::bantime::%arg 1%} broadcast "%{sban::properties::prefix}% &a&lGracz &c%arg 1% &a&lzostal odbanowany przez &c%{_banned}% &a&l!" stop else: send "%{sban::properties::prefix}% &c&lTen gracz nie ma bana!" stop else: send "%{sban::properties::prefix}% &c&lPodaj nick gracza!" stop else: send "%{sban::properties::prefix}% &c&lBrak uprawnien! &7(sban.odbanuj)" stop command /sbpanel []: trigger: if player has permission "sban.panel": if arg 1 is set: set {sban::panel::%player%} to arg 1 open chest with 3 rows named "&a&lSbanPanel" to player set {_i} to 0 loop 10 times: set player's current inventory's slot {_i} to black stained glass pane named "" with lore "" add 1 to {_i} set player's current inventory's slot 11 to red wool named "&4&lZBANUJ (PERM)" with lore "&7>> &6Banujesz gracza na zawsze." set player's current inventory's slot 13 to head named "&7%arg 1%" with lore "&7>> &6To jest gracz na ktorym dzialasz" set player's current inventory's slot 15 to yellow wool named "&6&lWYKOP" with lore "&7>> &6Wyrzucasz gracza z serwera." set player's current inventory's slot 17 to black stained glass pane named "" with lore "" set {_i} to 18 loop 9 times: set player's current inventory's slot {_i} to black stained glass pane named "" with lore "" add 1 to {_i} else: send "%{sban::properties::prefix}% &c&lBrak uprawnien &7(sban.panel)" stop command /wykop [] []: trigger: if sender has permission "sban.wykop": if arg 1 is set: if arg 2 is set: if arg 1 is online: set {_kicked} to player if sender is console: set {_kicked} to "CONSOLE" kick arg 1 due to "&7===== &6&lSERWER &7=====%nl%&cZostales wyrzucony!%nl%&a&lAdmin: &f&l%{_kicked}%%nl%&a&lPowod: &f&l%arg 2%%nl%&7===== &6&lSERWER &7=====" stop else: send "%{sban::properties::prefix}% &c&lGracz jest offline!" stop else: send "%{sban::properties::prefix}% &c&lPodaj powod!" stop else: send "%{sban::properties::prefix}% &c&lPodaj nick!" stop else: send "%{sban::properties::prefix}% &c&lBrak uprawnien &7(sban.wykop)" stop command /temp [] [] []: trigger: if sender has permission "sban.temp": if arg 1 is set: if arg 2 is set: if argument 3 is not set: send "%{sban::properties::prefix}% &c&lPodaj czas!" stop else: if file "plugins/Sban/banList/%arg 1%.yml" doesn't exists: if arg 1 is online: create file "plugins/Sban/banList/%arg 1%.yml" set {_to} to arg 3 set {_time} to now add {_to} to {_time} set {_banned} to player if sender is console: set {_banned} to "CONSOLE" set "info.type" to "TEMP" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.date" to "%now%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.admin" to "%{_banned}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.reason" to "%arg 2%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.to" to "%{_time}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set {_tempMsg} to value "messages.tempMsg" get of "plugins/Sban/config.yml" replace all "[player]" with "%arg 1%" in {_tempMsg} replace all "[type]" with "TEMP" in {_tempMsg} replace all "[admin]" with "%{_banned}%" in {_tempMsg} replace all "[reason]" with "%arg 2%" in {_tempMsg} replace all "[date]" with "%now%" in {_tempMsg} replace all "[nl]" with "%nl%" in {_tempMsg} replace all "[lightred]" with "&c" in {_tempMsg} replace all "[red]" with "&4" in {_tempMsg} replace all "[white]" with "&f" in {_tempMsg} replace all "[aqua]" with "&b" in {_tempMsg} replace all "[lightgreen]" with "&a" in {_tempMsg} replace all "[bold]" with "&l" in {_tempMsg} replace all "[italic]" with "&o" in {_tempMsg} replace all "[black]" with "&0" in {_tempMsg} replace all "[green]" with "&2" in {_tempMsg} replace all "[yellow]" with "&6" in {_tempMsg} replace all "[lightyellow]" with "&e" in {_tempMsg} replace all "[gray]" with "&8" in {_tempMsg} replace all "[lightgray]" with "&7" in {_tempMsg} replace all "[darkblue]" with "&1" in {_tempMsg} replace all "[ending]" with "%{_time}%" in {_tempMsg} set {sban::bantime::%arg 1%} to {_time} kick arg 1 due to "%{_tempMsg}%" broadcast "%{sban::properties::prefix}% &a&lGracz &c%arg 1% &a&lzostal tymczasowo zbanowany do &6&l%{_time}% &a&l przez &c%{_banned}% &a&lza &6&l%arg 2% &a&l!" stop else: create file "plugins/Sban/banList/%arg 1%.yml" set {_to} to arg 3 set {_time} to now add {_to} to {_time} set {_banned} to player if sender is console: set {_banned} to "CONSOLE" set "info.type" to "TEMP" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.date" to "%now%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.admin" to "%{_banned}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.reason" to "%arg 2%" in yml file "plugins/Sban/banList/%arg 1%.yml" set "info.to" to "%{_time}%" in yml file "plugins/Sban/banList/%arg 1%.yml" set {sban::bantime::%arg 1%} to {_time} broadcast "%{sban::properties::prefix}% &a&lGracz &7[&4&lOFFLINE&7] &c%arg 1% &a&lzostal tymczasowo zbanowany do &6&l%{_time}% &a&l przez &c%{_banned}% &a&lza &6&l%arg 2% &a&l!" stop else: send "%{sban::properties::prefix}% &c&lTen gracz ma juz bana!" stop else: send "%{sban::properties::prefix}% &c&lPodaj powod!" stop else: send "%{sban::properties::prefix}% &c&lPodaj nick!" stop else: send "%{sban::properties::prefix}% &c&lBrak uprawnien &7(sban.temp)" stop on connect: if file "plugins/Sban/banList/%player%.yml" exists: set {_type} to single value "info.type" get of "plugins/Sban/banList/%player%.yml" if {_type} is "PERM": set {_date} to single value "info.date" get of "plugins/Sban/banList/%player%.yml" set {_admin} to single value "info.admin" get of "plugins/Sban/banList/%player%.yml" set {_reason} to single value "info.reason" get of "plugins/Sban/banList/%player%.yml" kick player due to "&7===== &6&lSERWER &7=====%nl%&cJestes zbanowany!%nl%&a&lTyp: &f&l%{_type}%%nl%&a&lAdmin: &f&l%{_admin}%%nl%&a&lPowod: &f&l%{_reason}%%nl%&a&lData: &f&l%{_date}%%nl%&7===== &6&lSERWER &7=====" stop if {_type} is "TEMP": set {_to} to value "info.to" get of "plugins/Sban/banList/%player%.yml" if now < {sban::bantime::%player%}: set {_date} to single value "info.date" get of "plugins/Sban/banList/%player%.yml" set {_admin} to single value "info.admin" get of "plugins/Sban/banList/%player%.yml" set {_reason} to single value "info.reason" get of "plugins/Sban/banList/%player%.yml" kick player due to "&7===== &6&lSERWER &7=====%nl%&cJestes zbanowany!%nl%&a&lTyp: &f&l%{_type}%%nl%&a&lAdmin: &f&l%{_admin}%%nl%&a&lPowod: &f&l%{_reason}%%nl%&a&lData: &f&l%{_date}%%nl%&a&lZbanowany do: &f&l%{_to}%%nl%&7===== &6&lSERWER &7=====" stop else: delete file "plugins/Sban/banList/%player%.yml" delete {sban::bantime::%player%} stop on inventory close: if {sban::panel::%player%} is set: if inventory name of current inventory of player is "&a&lSbanPanel": delete {sban::panel::%player%} stop on inventory click: if inventory name of current inventory of player is "&a&lSbanPanel": if player's current inventory's slot slot is black stained glass pane: cancel event if player's current inventory's slot slot is red wool: execute console command "zbanuj %{sban::panel::%player%}% Zbanowano przez panel!" cancel event if player's current inventory's slot slot is head: cancel event if player's current inventory's slot slot is yellow wool: execute console command "wykop %{sban::panel::%player%}% Wyrzucono przez panel!" cancel event if inventory name of current inventory of player is "&6&lSBanHelp": if player's current inventory's slot slot is book: cancel event if player's current inventory's slot slot is paper: cancel event if player's current inventory's slot slot is black stained glass pane: cancel event if player's current inventory's slot slot is tnt: close player's inventory cancel event