public class Emotes
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Emotes |
instance
The instance of the class
|
Constructor and Description |
---|
Emotes(org.bukkit.configuration.file.FileConfiguration config)
Do not use.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEmote(Emote emote)
Adds and emote to the list.
|
Emote |
getEmoteByCode(java.lang.String code)
Returns an emote by its code from the list.
|
Emote |
getEmoteByName(java.lang.String name)
Returns an emote by its name from the list.
|
java.util.List<Emote> |
getEmotesList()
Returns all the emotes in a list.
|
boolean |
isEmotePresent(Emote emote)
Checks if an emote is in the list.
|
boolean |
isEmotePresentByCode(java.lang.String code)
Checks if an emote is in the list by its code.
|
boolean |
isEmotePresentByName(java.lang.String name)
Checks if an emote is in the list by its name.
|
java.lang.String |
parseText(java.lang.String text,
boolean checkPerms,
org.bukkit.entity.Player player)
Parses a string by adding emojis to it using PAPI (if installed).
|
java.lang.String |
parseTextWithoutPAPI(java.lang.String text,
boolean checkPerms,
org.bukkit.entity.Player player)
Parses a string by adding emojis to it without using PAPI.
|
void |
reload(org.bukkit.configuration.file.FileConfiguration config)
Called when emoteschat is reloaded (only internal use)
|
boolean |
removeEmote(Emote emote)
Removes and emote from the list.
|
boolean |
removeEmoteByCode(java.lang.String code)
Removes and emote from the list by its code.
|
boolean |
removeEmoteByName(java.lang.String name)
Removes and emote from the list by its name.
|
public static Emotes instance
public Emotes(org.bukkit.configuration.file.FileConfiguration config)
Instantiates the emotes class.
config
- Config file.public boolean addEmote(Emote emote)
emote
- Emote to add.public void reload(org.bukkit.configuration.file.FileConfiguration config)
config
- Plugin configpublic boolean removeEmote(Emote emote)
emote
- Emote to remove.public boolean removeEmoteByName(java.lang.String name)
name
- Name of the emote to remove.public boolean removeEmoteByCode(java.lang.String code)
code
- Code of the emote to remove.public boolean isEmotePresent(Emote emote)
emote
- Emote to check.public boolean isEmotePresentByName(java.lang.String name)
name
- Name of the emote to check.public boolean isEmotePresentByCode(java.lang.String code)
code
- Code of the emote to check.public Emote getEmoteByName(java.lang.String name)
name
- Name of the emote to search.public Emote getEmoteByCode(java.lang.String code)
code
- Code of the emote to search.public java.util.List<Emote> getEmotesList()
public java.lang.String parseTextWithoutPAPI(java.lang.String text, boolean checkPerms, org.bukkit.entity.Player player)
text
- The text to parse.checkPerms
- Check the permissions of the provided player in order to verify if they can use each emote.player
- Player to check permission (can be null).public java.lang.String parseText(java.lang.String text, boolean checkPerms, org.bukkit.entity.Player player)
text
- The text to parse.checkPerms
- Check the permissions of the provided player in order to verify if they can use each emote.player
- Player to check permission (can be null).