Class ColorHandler<T>
java.lang.Object
org.lushplugins.chatcolorhandler.common.ColorHandler<T>
- Type Parameters:
T- Translation output type
- Direct Known Subclasses:
PaperColor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbroadcastMessage(@Nullable String message) Sends all online players a messagevoidbroadcastMessage(String... messages) Sends all online players multiple messagesparsers()voidsendActionBarMessage(Collection<org.bukkit.entity.Player> players, @Nullable String message) Sends multiple players an action bar messageabstract voidsendActionBarMessage(org.bukkit.entity.Player player, @Nullable String message) Sends a player an action bar messagevoidsendMessage(Collection<org.bukkit.command.CommandSender> recipients, @Nullable String message) Sends multiple recipients a messagevoidsendMessage(Collection<org.bukkit.command.CommandSender> recipients, String... messages) Sends multiple recipients, multiple messagesabstract voidsendMessage(org.bukkit.command.CommandSender recipient, @Nullable String message) Sends a recipient a messagevoidsendMessage(org.bukkit.command.CommandSender recipient, String... messages) Sends a recipient multiple messagesvoidsendTitle(Collection<org.bukkit.entity.Player> players, @Nullable String title) Send multiple players a title messagevoidsendTitle(Collection<org.bukkit.entity.Player> players, @Nullable String title, @Nullable String subtitle) Send multiple players a title messagevoidsendTitle(Collection<org.bukkit.entity.Player> players, @Nullable String title, @Nullable String subtitle, int fadeIn, int fadeOut) Send multiple players a title messagevoidsendTitle(Collection<org.bukkit.entity.Player> players, @Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Send multiple players a title messagevoidSend a player a title messagevoidSend a player a title messagevoidsendTitle(org.bukkit.entity.Player player, @Nullable String title, @Nullable String subtitle, int fadeIn, int fadeOut) Send a player a title messageabstract voidsendTitle(org.bukkit.entity.Player player, @Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Send a player a title messagesettings()Translates a string to allow for hex colours and placeholdersTranslates a string to allow for hex colours and placeholdersabstract Ttranslate(@Nullable String string, @Nullable org.bukkit.entity.Player player, Collection<Parser> parsers) Translates a string to allow for hex colours and placeholderstranslate(@Nullable String string, Collection<Parser> parsers) Translates a string to allow for hex colours and placeholderstranslate(Collection<String> strings) Translates a collection of strings to allow for hex colours and placeholderstranslate(Collection<String> strings, List<Parser> parsers) Translates a collection of strings to allow for hex colours and placeholderstranslate(Collection<String> strings, org.bukkit.entity.Player player) Translates a collection of strings to allow for hex colours and placeholderstranslate(Collection<String> strings, org.bukkit.entity.Player player, List<Parser> parsers) Translates a collection of strings to allow for hex colours and placeholders
-
Constructor Details
-
ColorHandler
public ColorHandler()
-
-
Method Details
-
settings
-
parsers
-
translate
public abstract T translate(@Nullable @Nullable String string, @Nullable @Nullable org.bukkit.entity.Player player, Collection<Parser> parsers) Translates a string to allow for hex colours and placeholders- Parameters:
string- String to be translatedplayer- Player to parse placeholders forparsers- Parsers which this message will be parsed through
-
translate
public T translate(@Nullable @Nullable String string, @Nullable @Nullable org.bukkit.entity.Player player) Translates a string to allow for hex colours and placeholders- Parameters:
string- String to be translatedplayer- Player to parse placeholders for
-
translate
Translates a string to allow for hex colours and placeholders- Parameters:
string- String to be translatedparsers- Parsers which this message won't be parsed through
-
translate
Translates a string to allow for hex colours and placeholders- Parameters:
string- String to be translated
-
translate
public List<T> translate(Collection<String> strings, org.bukkit.entity.Player player, List<Parser> parsers) Translates a collection of strings to allow for hex colours and placeholders- Parameters:
strings- Strings to be translatedplayer- Player to parse placeholders forparsers- Parsers which this message will be parsed through
-
translate
Translates a collection of strings to allow for hex colours and placeholders- Parameters:
strings- Strings to be translatedplayer- Player to parse placeholders for
-
translate
Translates a collection of strings to allow for hex colours and placeholders- Parameters:
strings- Strings to be translatedparsers- Parsers which this message will be parsed through
-
translate
Translates a collection of strings to allow for hex colours and placeholders- Parameters:
strings- Strings to be translated
-
sendMessage
public abstract void sendMessage(org.bukkit.command.CommandSender recipient, @Nullable @Nullable String message) Sends a recipient a message- Parameters:
recipient- Sender to receive this messagemessage- Message to be displayed
-
sendMessage
Sends a recipient multiple messages- Parameters:
recipient- Sender to receive messagemessages- Messages to be displayed
-
sendMessage
public void sendMessage(Collection<org.bukkit.command.CommandSender> recipients, @Nullable @Nullable String message) Sends multiple recipients a message- Parameters:
recipients- Senders to receive messagemessage- Message to be displayed
-
sendMessage
public void sendMessage(Collection<org.bukkit.command.CommandSender> recipients, String... messages) Sends multiple recipients, multiple messages- Parameters:
recipients- Senders to receive this messagemessages- Messages to be displayed
-
broadcastMessage
Sends all online players a message- Parameters:
message- Message to be displayed
-
broadcastMessage
Sends all online players multiple messages- Parameters:
messages- Messages to be displayed
-
sendActionBarMessage
public abstract void sendActionBarMessage(org.bukkit.entity.Player player, @Nullable @Nullable String message) Sends a player an action bar message- Parameters:
player- Player to receive this action bar messagemessage- Message to be displayed
-
sendActionBarMessage
public void sendActionBarMessage(Collection<org.bukkit.entity.Player> players, @Nullable @Nullable String message) Sends multiple players an action bar message- Parameters:
players- Players to receive this action bar messagemessage- Message to be displayed
-
sendTitle
public abstract void sendTitle(org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Send a player a title message- Parameters:
player- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayedfadeIn- Duration for title to fade instay- Duration for title to appearfadeOut- Duration for title to fade out
-
sendTitle
public void sendTitle(org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int fadeOut) Send a player a title message- Parameters:
player- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayedfadeIn- Duration for title to fade infadeOut- Duration for title to fade out
-
sendTitle
public void sendTitle(org.bukkit.entity.Player player, @Nullable @Nullable String title, @Nullable @Nullable String subtitle) Send a player a title message- Parameters:
player- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayed
-
sendTitle
Send a player a title message- Parameters:
player- Player to receive this titletitle- Title to be displayed
-
sendTitle
public void sendTitle(Collection<org.bukkit.entity.Player> players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int stay, int fadeOut) Send multiple players a title message- Parameters:
players- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayedfadeIn- Duration for title to fade instay- Duration for title to appearfadeOut- Duration for title to fade out
-
sendTitle
public void sendTitle(Collection<org.bukkit.entity.Player> players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle, int fadeIn, int fadeOut) Send multiple players a title message- Parameters:
players- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayedfadeIn- Duration for title to fade infadeOut- Duration for title to fade out
-
sendTitle
public void sendTitle(Collection<org.bukkit.entity.Player> players, @Nullable @Nullable String title, @Nullable @Nullable String subtitle) Send multiple players a title message- Parameters:
players- Player to receive this titletitle- Title to be displayedsubtitle- Subtitle to be displayed
-
sendTitle
public void sendTitle(Collection<org.bukkit.entity.Player> players, @Nullable @Nullable String title) Send multiple players a title message- Parameters:
players- Player to receive this titletitle- Title to be displayed
-