Class Message
java.lang.Object
de.oliver.fancylib.translations.message.Message
- Direct Known Subclasses:
MultiMessage, SimpleMessage
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TextConfigprotected net.kyori.adventure.text.minimessage.tag.resolver.TagResolver.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionbar(org.bukkit.entity.Player receiver) addTagResolver(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver resolver) protected voidabstract MessageApplies custom placeholders to the messageabstract net.kyori.adventure.text.ComponentBuilds the message as a componentabstract Messagecopy()Copies the messageabstract Messageerror()Adds the error color to the messageabstract Messageprimary()Adds the primary color to the messageabstract MessageReplaces a placeholder in the messageabstract MessagereplaceStripped(String placeholder, String replacement) Replaces a placeholder in the message, all known tags are stripped from the replacementabstract MessageAdds the secondary color to the messagevoidsend(org.bukkit.command.CommandSender receiver) abstract Messagesuccess()Adds the success color to the messageabstract Messagewarning()Adds the warning color to the messageabstract MessageAdds the prefix to the message
-
Field Details
-
config
-
tagResolverBuilder
protected net.kyori.adventure.text.minimessage.tag.resolver.TagResolver.Builder tagResolverBuilder
-
-
Constructor Details
-
Message
-
-
Method Details
-
addTagResolver
public Message addTagResolver(net.kyori.adventure.text.minimessage.tag.resolver.TagResolver resolver) -
applyColorPlaceholders
protected void applyColorPlaceholders() -
replace
-
replaceStripped
-
withPrefix
-
-
secondary
-
success
-
warning
-
error
-
applyCustomPlaceholders
Applies custom placeholders to the message- Returns:
- this message
-
buildComponent
public abstract net.kyori.adventure.text.Component buildComponent()Builds the message as a component- Returns:
- the built component
-
copy
-
send
public void send(org.bukkit.command.CommandSender receiver) -
actionbar
public void actionbar(org.bukkit.entity.Player receiver)
-