options: #--------------NIE DOTYKAĆ------------# Version: 1.2.8 # Author: "PolsatGraniePL#5444" # #-------------------------------------# #Jeżeli opcja jest zaznaczona na true oznacza to, że #Tip-Tool będzie widoczny, ale jest jedna mała wada. #Wiadomość będzie interpretowana jako tekst na czacie #zamiast wiadomość gracza przez opcja taka jak /mute #nie sprawdzałem ale może nie działać. Uzyj-Tip-Tool: true #Jeżeli opcja jest włączona, po naciśnięciu na tekst #zostanie "zaproponowana" komenda którą wpisujesz wada #rubrykę Typ-komendy: #(Działa tylko jeżeli Uzyj-Tip-Tool jest włączony.) Uzyj-Komendy: true Typ-komendy: /msg %{_gracz}% # (Użyj {_gracz} zamiast %player%) #Czy wysłane przez graczy wiadomości mają również wysyłać się do konsoli console-messages: true #Automatycznie aktualizuj skrypt. (Dostępne tylko z dodatkiem SkUtilities) Auto-UpToDate: true # Mozliwe do uzycia zmienne (Tylko: chat-format, Tip-Tool-format, chat-format-Radius-Admin, Tip-Tool-format-Radius-Admin): # {P} - pokazuje nick gracza # {P-Prefix} - pokazuje nick gracza razem z jego prefixem/suffixem # {Message} - pokazuje wiadomość gracza # {World} - Aktualny świat gracza # {Coordinats} - Aktualne koordynaty gracza # {NewLine} - Tworzy nową linie # {Data} - Pokazuje date wysłania wiadomości # {Zmienna-1} - Dostosuj własną zmienną (Użyj {_gracz} zamiast %player%) Zmienna-1: {points::%{_gracz}%} # {Zmienna-2} - Dostosuj własną zmienną (Użyj {_gracz} zamiast %player%) Zmienna-2: {tekst::%{_gracz}%} #Wygląd głównego czatu chat-format: &8[&c{Zmienna-1} | {Zmienna-2}, {World}&8] &7{P-Prefix} &8» &r{Message} #Wygląd wiadomości po najechaniu na nią. Tip-Tool-format: &7Kliknij aby napisać{NewLine}prywatną wiadomość{NewLine}{NewLine}&eGracz: {P}{NewLine}&cZmienna 1: {Zmienna-1}{NewLine}&cZmienna 2: {Zmienna-2}{NewLine}&bData wysłania: {Data} #Czat na daną odległość bloków (Wpisz -1 jeżeli chcesz wyłączyć) Czat-Radius: -1 #Wygląd wiadomości dla administratora jeżeli posiada permisje z Czat-Radius-Bypass chat-format-Radius-Admin: &8[&6Czat-Radius&c, {World}&8] &7{P-Prefix} &8» &r{Message} #Wygląd wiadomości po najechaniu na nią dla administratora jeżeli posiada permisje z Czat-Radius-Bypass Tip-Tool-format-Radius-Admin: &7Kliknij aby napisać{NewLine}prywatną wiadomość{NewLine}{NewLine}&eGracz: {P}{NewLine}&cZmienna 1: {Zmienna-1}{NewLine}&cZmienna 2: {Zmienna-2}{NewLine}&bData wysłania: {Data} ADMIN #Czy info o tym ,że ktoś kogoś zmutował ma się pojawiać na czacie Mute-broadcast: true #-------WKRÓTCE----JAK-SIĘ-UDA-----------# Message-Delete: true Message-Delete-icon: &c❌ Message-restore-icon: &a♻ Message-Delete-Permission: TipToolChat.Delete-message.use #--------------------------KOMENDY---------------------# Main-Command: TipToolChat # 1 Aliases-Main-Command: TTC, tiptool, chat # nieskończona ilość # Mute-Global-Argument: muteglobal # 1 UnMute-Global-Argument: unmuteglobal # 1 # Mute-Player: muteplayer # 1 # # #-------------------------WIADOMOŚCI-------------------# Nikt-nie-uslyszal: &eNikt cię nie usłyszał! Main-Command-NoPerm: &cNie posiadasz permisji do tej komendy! Main-Command-NoArgument: &cWpisz argument Main-Command-FiledArgument: &cNieznany argument Main-Command-GlobalMuteInfo: &cCzat Globalny został zablokowany Main-Command-GlobalUnMuteInfo: &aCzat Globalny został odblokowany GlobalChat-Muted: &cCzat jest aktualnie zablokowany! Global-Mute-NoPerm: &cNie posiadasz permisji aby użyć tej komendy! Global-UnMute-NoPerm: &cNie posiadasz permisji aby użyć tej komendy! Mute-failed-ToAdmin: &cNie możesz go zmutować! Mute-failed-NoPlayerSet: &cPodaj gracza! Mute-NoPerm: &cNie posiadasz permisji do tej komendy! #---------------------------------------# #Dostępne zmienne: # # {P} - nick gracza # Mute-Succes: &aPoprawnie zmutowano {P} Mute-broadcast-format: &7Gracz &c{P} &7został zmutowany! #---------------------------------------# Mute-JestesZmutowany: &cJesteś obecnie zmutowany! #--------------------------PERMISJE---------------------# Czat-Radius-Bypass: TipToolChat.Chat-radius.bypass Mute-global-czat: TipToolChat.Mute-global-czat Main-Command-Use: TipToolChat.command.use GlobalChatMute-Bypass: TipToolChat.GlobalChatMute.Bypass Mute-Player-permission: TipToolChat.Mute-Player Mute-Admin-Bypass: TipToolChat.Mute-Admin-Bypass function replaceVariables(wiadomosc: text, gracz: player, message: text): replace all "{P}" with "%{_gracz}%" in {_wiadomosc} replace all "{P-Prefix}" with {_gracz}'s display name in {_wiadomosc} replace all "{Message}" with "%{_message}%" in {_wiadomosc} replace all "{World}" with "%{_gracz}'s world%" in {_wiadomosc} replace all "{Coordinats}" with "%location of {_gracz}%" in {_wiadomosc} replace all "{Zmienna-1}" with "%{@Zmienna-1}%" in {_wiadomosc} replace all "{Zmienna-2}" with "%{@Zmienna-2}%" in {_wiadomosc} replace all "{NewLine}" with nl in {_wiadomosc} replace all "{Data}" with "%now%" in {_wiadomosc} set {replc::%{_gracz}%} to "%{_wiadomosc}%" function SendChatMessage(gracz: player, message: text): set {_} to "{@chat-format}" set {_x} to "{@chat-format-Radius-Admin}" set {_xtip} to "{@Tip-Tool-format-Radius-Admin}" set {_tip} to "{@Tip-Tool-format}" replaceVariables({_}, {_gracz}, {_message}) set {_} to {replc::%{_gracz}%} replaceVariables({_x}, {_gracz}, {_message}) set {_x} to {replc::%{_gracz}%} replaceVariables({_xtip}, {_gracz}, {_message}) set {_xtip} to {replc::%{_gracz}%} replaceVariables({_tip}, {_gracz}, {_message}) set {_tip} to {replc::%{_gracz}%} delete {replc::%{_gracz}%} delete {TipToolChat.uslysz.%{_gracz}%} if {@Uzyj-Tip-Tool} is true: if {@Uzyj-Komendy} is true: if "{@Czat-Radius}" is "-1": send formatted "%{_}%" to all players if {@console-messages} is true: send formatted "%{_}%" to console stop stop loop all players: if loop-player has permission "{@Czat-Radius-Bypass}": if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true else: send formatted "%{_x}%" to loop-player else: if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true if {@console-messages} is true: send formatted "%{_}%" to console if {TipToolChat.uslysz.%{_gracz}%} is not set: send "{@Nikt-nie-uslyszal}" to {_gracz} stop stop if "{@Czat-Radius}" is "-1": send formatted "%{_}%" to all players if {@console-messages} is true: send formatted "%{_}%" to console stop stop loop all players: if loop-player has permission "{@Czat-Radius-Bypass}": if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true else: send formatted "%{_x}%" to loop-player else: if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true if {@console-messages} is true: send formatted "%{_}%" to console if {TipToolChat.uslysz.%{_gracz}%} is not set: send "{@Nikt-nie-uslyszal}" to {_gracz} stop stop if "{@Czat-Radius}" is "-1": send formatted "%{_}%" to all players stop loop all players: if loop-player has permission "{@Czat-Radius-Bypass}": if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true else: send formatted "%{_x}%" to loop-player else: if distance between location of {_gracz} and location of loop-player <= {@Czat-Radius}: send formatted "%{_}%" to loop-player if loop-player is not {_gracz}: set {TipToolChat.uslysz.%{_gracz}%} to true if {@console-messages} is true: send formatted "%{_}%" to console if {TipToolChat.uslysz.%{_gracz}%} is not set: send "{@Nikt-nie-uslyszal}" to {_gracz} on chat: cancel event if {TipToolChat.mute.%player%} is not set: if {TipToolChat.GlobalChatMute} is false: SendChatMessage(player, message) stop if player has permission "{@GlobalChatMute-Bypass}": SendChatMessage(player, message) stop send "{@GlobalChat-Muted}" stop send "{@Mute-JestesZmutowany}" import: org.bukkit.event.server.TabCompleteEvent java.util.ArrayList java.util.List on TabCompleteEvent: if event.getBuffer() is "/{@Main-Command} ": set {_list} to new ArrayList() {_list}.add("{@Mute-Global-Argument}") {_list}.add("{@UnMute-Global-Argument}") {_list}.add("{@Mute-Player}") event.setCompletions({_list}) loop {TipToolChat.MainCommandAliases::*}: if event.getBuffer() is "/%loop-value% ": set {_list} to new ArrayList() {_list}.add("{@Mute-Global-Argument}") {_list}.add("{@UnMute-Global-Argument}") {_list}.add("{@Mute-Player}") event.setCompletions({_list}) command /{@Main-Command} [] []: permission: {@Main-Command-Use} permission message: {@Main-Command-NoPerm} aliases: {@Aliases-Main-Command} trigger: if arg-1 is set: if arg-1 is "{@Mute-Global-Argument}": if player has permission "{@Mute-global-czat}": set {TipToolChat.GlobalChatMute} to true broadcast "{@Main-Command-GlobalMuteInfo}" stop send "{@Global-Mute-NoPerm}" stop if arg-1 is "{@UnMute-Global-Argument}": if player has permission "{@Mute-global-czat}": set {TipToolChat.GlobalChatMute} to false broadcast "{@Main-Command-GlobalUnMuteInfo}" stop send "{@Global-UnMute-NoPerm}" stop if arg-1 is "{@Mute-Player}": if player has permission "{@Mute-Player-permission}": if player-arg is set: if player-arg has permission "{@Mute-Admin-Bypass}": send "{@Mute-failed-ToAdmin}" stop set {_} to "{@Mute-Succes}" replace all "{P}" with "%player-arg%" in {_} send "%{_}%" set {TipToolChat.mute.%player%} to true if {@Mute-broadcast} is true: set {_x} to "{@Mute-broadcast-format}" replace all "{P}" with "%player-arg%" in {_x} broadcast "%{_x}%" stop stop send "{@Mute-failed-NoPlayerSet}" stop send "{@Mute-NoPerm}" stop send "{@Main-Command-FiledArgument}!" stop send "{@Main-Command-NoArgument}" on load: delete {TipToolChat.MainCommandAliases::*} set {TipToolChat.MainCommandAliases::*} to split "{@Aliases-Main-Command}" at ", " if {@Auto-UpToDate} is true: set {_ver} to text from "https://code.skript.pl/QyIrE3Rs/raw" if "{@Version}" is "%{_ver}%": send "&7[&6Skript&7] &fSkrypt &6%script%.sk&f jest aktualny." to console stop reload script script delete file "plugins/Skript/scripts/-%script%.sk" download file from "https://code.skript.pl/HnNMN1rK/raw" to file "plugins/Skript/scripts/%script%.sk" send "&7[&6Skript&7] &fWgrano najnowszą wersje &6%script%.sk&f." to console reload script script wait 1 tick send "&7[&6Skript&7] &fOczyszczanie &6%script%.sk&f z błędów. (Ponowne uruchomienie)" to console reload script script stop stop