on load: if file "plugins/xChat/config.yml" doesn't exist: send "&9&lxChat &8>> &fTworzenie plików skryptu &b'plugins/xChat/config.yml'" to console wait 5 ticks load yaml "plugins/xChat/config.yml" as "config" set yaml value "version" from "config" to 1.0 set the comments of yaml node "version" from "config" to "Nie zmieniaj tej opcji!" set yaml value "update-checker" from "config" to true set the comments of yaml node "update-checker" from "config" to "Automatyczne sprawdzanie aktualizacji skryptu" set yaml value "join-message" from "config" to true set yaml value "join-message.msg" from "config" to "&8&l[&a&l+&8&l] &7>> &f_player_" set yaml value "firstjoin-message" from "config" to true set yaml value "firstjoin-messages.msg" from "config" to "&8&l[&a&l+&8&l] &7>> &fGracz _player_ dołączył po raz pierwszy!" set yaml value "leave-message" from "config" to true set yaml value "leave-message.msg" from "config" to "&8&l[&c&l-&8&l] &7>> &f_player_" set yaml value "mention" from "config" to true set yaml value "mention.type" from "config" to "actionbar" set the comments of yaml node "mention" from "config" to "Oznaczenie gdy ktoś użyj @nick" and "Dostępne wartości to: actionbar, chat, title, subtitle" set yaml value "msg.to" from "config" to "&8&l[ &9TY &8&l] &7>> &8&l[ &9_player_ &8&l] &f_message_" set yaml value "msg.from" from "config" to "&8&l[ &9_sender_ &8&l] &7>> &8&l[ &9TY &8&l] &f_message_" if file "plugins/xChat/messages.yml" doesn't exist: send "&9&lxChat &8>> &fTworzenie plików skryptu &b'plugins/xChat/messages.yml'" to console wait 5 ticks load yaml "plugins/xChat/messages.yml" as "messages" set yaml value "prefix" from "messages" to "&9&lxChat &8>>" set the comments of yaml node "prefix" from "messages" to "Prefix używany w wiadomościach na chacie" set yaml value "server" from "messages" to "&9&lTwojeIP.pl" set the comments of yaml node "server" from "messages" to "IP Twojego serwera, będzie używany w wiadomościach" set yaml value "discord" from "messages" to "dc.TwojeIp.pl" set yaml list "message.help" from "messages" to "&9&lPomoc" and " " and "&9* &f/spawn" and "&9* &f/sklep" and "&9* &f/helpop" and " " set the comments of yaml node "messages" from "messages" to "Wiadomości skryptu, edytuj pod siebie" set yaml value "messages.broadcast.chat" from "messages" to "_prefix_ &f_broadcast_" set yaml value "messages.broadcast.title" from "messages" to "&f_broadcast_" set yaml value "messages.broadcast.subtitle" from "messages" to "&f_broadcast_" set yaml value "messages.broadcast.actionbar" from "messages" to "&9<< &f_broadcast_ &9>>" set yaml value "messages.broadcast.bossbar" from "messages" to "&f_broadcast_" set yaml value "messages.broadcast.send" from "messages" to "_prefix_ &aPomyślnie &fwysłano wiadomość do wszystkich graczy" set yaml value "messages.broadcast.does-not-set" from "messages" to "_prfix_ &cYou must set broadcast type or message" set yaml value "messages.chat-off" from "messages" to "_prefix_ &fChat został &c&nwyłączony &fprzez &7_player_" set yaml value "messages.chat-on" from "messages" to "_prefix_ &fChat został &awłączony &fprzez &7_player_" set yaml value "messages.chat-premium" from "messages" to "_prefix_ &fChat został wyłączony dla osób bez rang premium!" set yaml value "messages.chat-cancel" from "messages" to "_prefix_ &7Aktualnie nie możesz pisać na chacie" set yaml value "messages.chat-already" from "messages" to "_prefix_ &cCzat jest już ustawiony na tą opcję" set yaml list "messages.mute" from "messages" to "&cZostałeś wyciszony!" and "&cPrzez administratora: &4_admin_" and "&cNa czas: &4_time_" set yaml value "messages.mute-succes" from "messages" to "_prefix_ &aWyciszono gracza &f_mute-player_ &ana &f_time_" set yaml value "messages.mute-message" from "messages" to "&cJesteś teraz wyciszony, pozostało &4_timeleft_" set yaml value "messages.mute-end" from "messages" to "_prefix_ &aTwoje wyciszenie dobiegło końca!" set yaml value "messages.mute-broadcast" from "message" to "_prefix_ &7Gracz &f_mute-player_ &7został wyciszony!" set yaml value "messages.unmute-succes" from "messages" to "_prefix_ &aPomyślnie &a&nodciszono &agracza _mute-player_" set yaml value "messages.already-muted" from "messages" to "_prefix_ &cTen gracz jest już wyciszony!" set yaml value "messages.not-selected" from "messages" to "_prefix_ &cNie ustawiłeś gracza / czasu muta" set yaml value "messages.already-unmuted" from "messages" to "_prefix_ &cTen gracz nie jest wyciszony" set yaml value "messages.discord" from "messages" to "_prefix_ &fAby dołączyć na discorda wpisz link -> _dc_" set yaml value "messages.add-badword" from "messages" to "_prefix_ &aDodano słowo _word_ do listy zbanowanych słów" set yaml value "messages.rem-badword" from "messages" to "_prefix_ &aUsunięto słowo _word_ z listy zbanowanych słów" set yaml value "messages.already-added" from "messages" to "_prefix_ &cTo słowo jest już dodane" set yaml value "messages.already-deleted" from "messages" to "_prefix_ &cTakie słowo nie jest dodano do listy" set yaml value "messages.emoji-add" from "messages" to "_prefix_ &aDodano nową emotkę!" set yaml value "messages.emoji-rem" from "messages" to "_prefix_ &aUsunięto emotkę!" set yaml value "messages.emoji-already-added" from "messages" to "_prefix_ &cTaka emotka jest już dodana" set yaml value "messages.emoji-already-deleted" from "messages" to "_prefix_ &cTaka emotka nie jest dodana" set yaml value "messages.clear-chat" from "messages" to "_prefix_ &fChat został wyczyszczony przez &7_player_" set yaml value "messages.no-perm" from "messages" to "_prefix_ &cNIE posidasz uprawnień!" if file "plugins/xChat/autobroadcast.yml" doesn't exist: wait 5 ticks load yaml "plugins/xChat/autobroadcast.yml" as "bc" set yaml value "count" from "bc" to 3 set the comments of yaml node "count" from "bc" to "Ile broadcastów masz włączonych poniżej?" and "Taka liczba broadcastów będzie aktywna" set yaml value "time" from "bc" to "600" set the comments of yaml node "time" from "bc" to "Czas co jaki będzie wysyłana wiadomość na chat" set yaml value "broadcast.0" from "bc" to true set yaml list "broadcast.0.message" from "bc" to " " and "&9&lDiscord" and " " and "&7Dołącz na naszego serwerowego" and "&7discorda aby być na bieżąco!" and " " set yaml list "broadcast.0.allowed-worlds" from "bc" to "world" and "nether" and "the end" set the comments of yaml node "Aby dodać więcej broadcastów, musisz skopiować tekst poniżej i wkleić go" and "ponownie zmieniając nazwę np '0' na liczbe o 1 wyższą" and "dodaj też 1 do opcji count" send "&9&lxChat &8>> &fWszystko gotowe!" to console set {_prefix} to yaml value "prefix" from "messages" set {_dc} to yaml value "discord" from "messages" function repText(text: text) :: text: replace all "_prefix_" in {_text} with "%{_prefix}%" replace all "_word_" in {_text} with "%{_word}%" replace all "_dc_" in {_text} with "%{_dc}%" replace all "_mutePlayer_" in {_text} with "%{_muteP}%" replace all "_timeLeft_" in {_text} with "%{_timeL}%" replace all "_time_" in {_text} with "%{_time}%" replace all "_admin_" in {_text} with "%{_admin}%" replace all "_player_" in {_text} with "%{_player}%" replace all "_broadcast_" in {_text} with "%{_bc}%" replace all "_sender_" in {_text} with "%{_sender}%" replace all "_message_" in {_text} with "%{_message}%" return "%{_text}%" function noPerm(player: player): set {_text} to yaml value "messages.no-perm" from "message" set {_msg} to coloured repText("%{_text}%") send "%{_msg}%" to {_player} function clearChat(player: player): set {_text} to yaml value "messages.clear-chat" from "messages" set {_msg} to coloured repText("%{_text}%") if {_player} has permission "xchat.clearchat": loop 100 times: send "" to all players send "%{_msg}%" to all players send "" to all players else: noPerm(player) function offChat(player: player): set {_offM} to yaml value "messages.chat-off" from "messages" set {_offMsg} to coloured repText("%{_offM}%") if {_player} has permission "xchat.offchat": if {chat} is false: set {chat} to true send "" to all players send "%{_offMsg}%" to all players send "" to all players else: set {_alreadyOff} to yaml value "messages.chat-already" from "messages" set {_alreadyOffMsg} to coloured repText("%{_alreadyOff}%") send "%{_alreadyOffMsg}%" to {_player} else: noPerm(player) function onChat(player: player): set {_onM} to yaml value "messages.chat-on" from "messages" set {_onMsg} to coloured repText("%{_onM}%") if {_player} has permission "xchat.onchat": if {chat} is true: set {chat} to false send "" to all players send "%{_onMsg}%" to all players send "" to all players else: set {_alreadyOff} to yaml value "messages.chat-already" from "messages" set {_alreadyOffMsg} to coloured repText("%{_alreadyOff}%") send "%{_alreadyOffMsg}%" to {_player} else: noPerm(player) function premiumChat(player: player): set {_premiumM} to yaml value "messages.chat-premium" from "messages" set {_premiumMsg} to coloured repText("%{_premiumM}%") if {_player} has permission "xchat.premium": if {chat} is false: if {pchat} is false: set {pchat} to true send "" to all players send "%{_premiumMsg}%" to all players send "" to all players else: set {_alreadyOff} to yaml value "messages.chat-already" from "messages" set {_alreadyOffMsg} to coloured repText("%{_alreadyOff}%") send "%{_alreadyOffMsg}%" to {_player} else: send "&cCzat jest wyłączony więc nie da się włączyć chatu premium" to {_player} else: noPerm(player) function pomoc(player: player): if {_player} has permission "xchat.pomoc": set {_helpM} to yaml value "messages.help" from "messages" set {_helpMsg} to coloured repText("%{_helpM}%") send "%{_helpMsg}%" to {_player} else: noPerm(player) function discord(player: player): if {_player} has permission "xchat.discord": set {_dc} to yaml value "discord" from "messages" set {_dcM} to yaml value "messages.discord" from "messages" set {_dcMsg} to coloured repText("%{_dcM}%") send "%{_dcMsg}%" to {_player} else: noPerm(player) function BroadCast(type: text, message: text, color: text, style: text, progres: integer): if player has permission "xchat.broadcast": if {_message} is set: set {_bc} to coloured {_message} if {_type} is "chat" or "czat": set {_bcc} to yaml value "messages.broadcast.chat" set {_broadcast} to coloured repText("%{_bcc}%") send "" to all players send "%{_broadcast}%" to all players send "" to all players if {_type} is "title" or "tytuł": set {_bcc} to yaml value "messages.broadcast.title" set {_broadcast} to coloured repText("%{_bcc}%") send title "%{_broadcast}%" to all players if {_type} is "subtitle" or "podtytuł": set {_bcc} to yaml value "messages.broadcast.subtitle" set {_broadcast} to coloured repText("%{_bcc}%") send title "" with subtitle "%{_broadcast}%" to all players if {_type} is "actionbar" or "pasekzadan": set {_bcc} to yaml value "messages.broadcast.actionbar" set {_broadcast} to coloured repText("%{_bcc}%") send actionbar "%{_broadcast}%" to all players if {_type} is "bossbar": set {_bcc} to yaml value "messages.broadcast.bossbar" set {_broadcast} to coloured repText("%{_bcc}%") if {_color} is set: if {_style} is set: if {_progres} is set: set {_bossbar} to bossbar named "Broadcast" with title "%{_broadcast}%" with color %{_color}% with style %{_style}% with progress %{_progres}% set bossbar players of {_bossbar} to player all players wait 30 seconds set bossbar visibility of {_bossbar} to false delete bossbar named "bossbar" else: set {_bossbar} to bossbar named "Broadcast" with title "%{_broadcast}%" with color %{_color}% with style %{_style}% set bossbar players of {_bossbar} to player all players wait 30 seconds set bossbar visibility of {_bossbar} to false delete bossbar named "bossbar" else: set {_bossbar} to bossbar named "Broadcast" with title "%{_broadcast}%" with color %{_color}% set bossbar players of {_bossbar} to player all players wait 30 seconds set bossbar visibility of {_bossbar} to false delete bossbar named "bossbar" else: set {_bossbar} to bossbar named "Broadcast" with title "%{_broadcast}%" set bossbar players of {_bossbar} to player all players wait 30 seconds set bossbar visibility of {_bossbar} to false delete bossbar named "bossbar" if {_type} is not set: set {_notSel} to yaml value "messages.broadcast.does-not-set" set {_notSet} to coloured repText("%{_notSel}%") send {_notSet} to player else: set {_notSel} to yaml value "messages.broadcast.does-not-set" set {_notSet} to coloured repText("%{_notSel}%") send {_notSet} to player else: noPerm(player) function mutePlayer(player: player, time: integer, message: text): if {_player} is set: if {_time} is set: if {_message} is set: if player has permissions "xchat.mute": if {_mute::%{_player}%} is false: set {_mute::%{_player}%} to true set {_msg} to yaml value "messages.mute" from "messages" set {_Message} to coloured repText("%{_msg}%") set {_msg2} to yaml value "messages.mute-secces" from "messages" set {_message2} to coloured repText("%{_msg2}%") set {_bro} to yaml value "messages.mute-broadcast" from "messages" set {_broadcastMute} to coloured repText("%{_bro}%") send "%{_Message}%" to {_player} send "%{_message2}%" to player send "%{_broadcastMute}%" to all players set {_muteTime::%{_player}%} to "%{_time}% minutes" parsed as timespan wait {_muteTime::%{_player}%} set {_mute::%{_player}%} to false if {_player} is online: set {_message3} to yaml value "messages.mute-end" from "messages" set {_mess3} to coloured repText("%{_message3}%") send "%{_message3}%" to {_player} else: set {_text} to yaml value "messages.already-muted" from "messages" set {_alreadyMuted} to coloured repText("%{_text}%") send "%{_alreadyMuted}%" else: noPerm(player) else: set {_text} to yaml value "messages.not-selected" from "messages" set {_NotSelected} to coloured repText("%{_text}%") send "%{_alreadyMuted}%" else: set {_text} to yaml value "messages.not-selected" from "messages" set {_NotSelected} to coloured repText("%{_text}%") send "%{_alreadyMuted}%" else: set {_text} to yaml value "messages.not-selected" from "messages" set {_NotSelected} to coloured repText("%{_text}%") send "%{_alreadyMuted}%" command /xchat [] [] [] []: trigger: if arg 1 is not set: if player has permission "xchat.about": send "" to player send "&9&lxChat" to player send "" to player send "&9* &fAutor: &7_xKubus_" to player send "&9* &fWersja: &71.0" to player send "" to player else: noPerm(player)