public class AnnoyingMessage
extends java.lang.Object
AnnoyingOptions.messagesFileName file| Modifier and Type | Class and Description |
|---|---|
static class |
AnnoyingMessage.BroadcastType
The different types of broadcasts for an
AnnoyingMessage |
static class |
AnnoyingMessage.ReplaceType
Different replace types for
replace(String, Object, ReplaceType) |
| Constructor and Description |
|---|
AnnoyingMessage(@NotNull AnnoyingPlugin plugin,
@NotNull java.lang.String key)
Constructs a new
AnnoyingMessage with the specified key |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast()
Broadcasts the message with the default
AnnoyingMessage.BroadcastType and title parameters |
void |
broadcast(@Nullable AnnoyingMessage.BroadcastType type)
Broadcasts the message with the specified
AnnoyingMessage.BroadcastType and default title parameters |
void |
broadcast(@Nullable AnnoyingMessage.BroadcastType type,
@Nullable java.lang.Integer fadeIn,
@Nullable java.lang.Integer stay,
@Nullable java.lang.Integer fadeOut)
Broadcasts the message with the specified
AnnoyingMessage.BroadcastType and title parameters |
net.md_5.bungee.api.chat.BaseComponent[] |
getBaseComponents()
Runs
getComponents(AnnoyingSender) using null |
net.md_5.bungee.api.chat.BaseComponent[] |
getBaseComponents(@Nullable AnnoyingSender annoyingSender)
Gets the message in
BaseComponents |
@NotNull java.util.List<com.olliez4.interface4.util.json.components.JSONComponent> |
getComponents()
Runs
getComponents(AnnoyingSender) using null |
@NotNull java.util.List<com.olliez4.interface4.util.json.components.JSONComponent> |
getComponents(@Nullable AnnoyingSender annoyingSender)
Gets the message in
JSONComponents |
@NotNull java.lang.String |
getMessage()
Runs
getMessage(AnnoyingSender) using null |
@NotNull java.lang.String |
getMessage(@Nullable AnnoyingSender sender)
Gets the message using
getComponents(AnnoyingSender) then joins the JSONComponents together |
AnnoyingMessage |
replace(@NotNull java.lang.String before,
@Nullable java.lang.Object after)
Replace a
String in the message with another Object |
AnnoyingMessage |
replace(@NotNull java.lang.String before,
@Nullable java.lang.Object after,
@NotNull AnnoyingMessage.ReplaceType type)
replace(String, Object) except with custom formatting |
void |
send(@NotNull AnnoyingSender sender)
Sends the message to the specified
AnnoyingSender |
void |
send(@NotNull org.bukkit.command.CommandSender sender)
Sends the message to the specified
CommandSender |
public AnnoyingMessage(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.lang.String key)
AnnoyingMessage with the specified keyplugin - the plugin getting the messagekey - the key of the messagepublic AnnoyingMessage replace(@NotNull @NotNull java.lang.String before, @Nullable @Nullable java.lang.Object after)
String in the message with another Objectbefore - the String to replaceafter - the Object to replace withAnnoyingMessage instancereplace(String, Object, ReplaceType)public AnnoyingMessage replace(@NotNull @NotNull java.lang.String before, @Nullable @Nullable java.lang.Object after, @NotNull @NotNull AnnoyingMessage.ReplaceType type)
replace(String, Object) except with custom formattingbefore - the String to replaceafter - the Object to replace withtype - the AnnoyingMessage.ReplaceType to useAnnoyingMessage instancereplace(String, Object),
AnnoyingMessage.ReplaceType@NotNull public @NotNull java.util.List<com.olliez4.interface4.util.json.components.JSONComponent> getComponents()
getComponents(AnnoyingSender) using nullJSONComponentssend(AnnoyingSender),
getComponents(AnnoyingSender)@NotNull
public @NotNull java.util.List<com.olliez4.interface4.util.json.components.JSONComponent> getComponents(@Nullable
@Nullable AnnoyingSender annoyingSender)
JSONComponentsannoyingSender - the AnnoyingSender to useJSONComponentssend(AnnoyingSender)public net.md_5.bungee.api.chat.BaseComponent[] getBaseComponents()
getComponents(AnnoyingSender) using nullBaseComponentsgetComponents(),
getBaseComponents(AnnoyingSender)public net.md_5.bungee.api.chat.BaseComponent[] getBaseComponents(@Nullable
@Nullable AnnoyingSender annoyingSender)
BaseComponentsannoyingSender - the AnnoyingSender to useBaseComponentsgetComponents(AnnoyingSender)@NotNull public @NotNull java.lang.String getMessage()
getMessage(AnnoyingSender) using null
This will only have the display text of the components, use getComponents() or getBaseComponents() for all parts
getComponents(),
getMessage(AnnoyingSender)@NotNull
public @NotNull java.lang.String getMessage(@Nullable
@Nullable AnnoyingSender sender)
getComponents(AnnoyingSender) then joins the JSONComponents together
This will only have the display text of the components, use getComponents(AnnoyingSender) or getBaseComponents(AnnoyingSender) for all parts
sender - the AnnoyingSender to usegetComponents(AnnoyingSender)public void broadcast()
AnnoyingMessage.BroadcastType and title parameters
This is equivalent to calling broadcast(BroadcastType) with null
public void broadcast(@Nullable
@Nullable AnnoyingMessage.BroadcastType type)
AnnoyingMessage.BroadcastType and default title parameters
This is equivalent to calling broadcast(BroadcastType, Integer, Integer, Integer) with null for all title parameters
type - the AnnoyingMessage.BroadcastType to broadcast withbroadcast(),
broadcast(BroadcastType, Integer, Integer, Integer)public void broadcast(@Nullable
@Nullable AnnoyingMessage.BroadcastType type,
@Nullable
@Nullable java.lang.Integer fadeIn,
@Nullable
@Nullable java.lang.Integer stay,
@Nullable
@Nullable java.lang.Integer fadeOut)
AnnoyingMessage.BroadcastType and title parameterstype - the AnnoyingMessage.BroadcastType to broadcast withfadeIn - the fade in time for the titlestay - the stay time for the titlefadeOut - the fade out time for the titlebroadcast(),
broadcast(BroadcastType)public void send(@NotNull
@NotNull org.bukkit.command.CommandSender sender)
CommandSender
This will convert the CommandSender to a AnnoyingSender and then run send(AnnoyingSender)
sender - the CommandSender to send the message tosend(AnnoyingSender)public void send(@NotNull
@NotNull AnnoyingSender sender)
AnnoyingSendersender - the AnnoyingSender to send the message tosend(CommandSender),
getComponents(AnnoyingSender)