Package io.github.slaim36.emoteschat.api
Class Emotes
java.lang.Object
io.github.slaim36.emoteschat.api.Emotes
A class that controls the emotes.
- Since:
- 1.2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Adds and emote to the list.getEmoteByCode
(String code) Returns an emote by its code from the list.getEmoteByName
(String name) Returns an emote by its name from the list.Emote[]
Returns all the emotes in an array.Returns all the emotes in a list.boolean
isEmotePresent
(Emote emote) Checks if an emote is in the list.boolean
isEmotePresentByCode
(String code) Checks if an emote is in the list by its code.boolean
isEmotePresentByName
(String name) Checks if an emote is in the list by its name.boolean
removeEmote
(Emote emote) Removes and emote from the list.boolean
removeEmoteByCode
(String code) Removes and emote from the list by its code.boolean
removeEmoteByName
(String name) Removes and emote from the list by its name.
-
Field Details
-
instance
The instance of the class- Since:
- 1.2
-
-
Constructor Details
-
Emotes
public Emotes(org.bukkit.configuration.file.FileConfiguration config) Do not use.
Instantiates all the emotes class.
- Parameters:
config
- Config file.- Since:
- 1.2
-
-
Method Details
-
addEmote
Adds and emote to the list.- Parameters:
emote
- Emote to add.- Returns:
- True if the emote was added successfully, and it wasn't already in the list.
- Since:
- 1.2
-
removeEmote
Removes and emote from the list.- Parameters:
emote
- Emote to remove.- Returns:
- True if the emote was removed successfully, false it wasn't in the list.
- Since:
- 1.2
-
removeEmoteByName
Removes and emote from the list by its name.- Parameters:
name
- Name of the emote to remove.- Returns:
- True if the emote was removed successfully, false it wasn't in the list.
- Since:
- 1.2
-
removeEmoteByCode
Removes and emote from the list by its code.- Parameters:
code
- Code of the emote to remove.- Returns:
- True if the emote was removed successfully, false it wasn't in the list.
- Since:
- 1.2
-
isEmotePresent
Checks if an emote is in the list.- Parameters:
emote
- Emote to check.- Returns:
- True if the emote was in the list.
- Since:
- 1.2
-
isEmotePresentByName
Checks if an emote is in the list by its name.- Parameters:
name
- Name of the emote to check.- Returns:
- True if the emote was in the list.
- Since:
- 1.2
-
isEmotePresentByCode
Checks if an emote is in the list by its code.- Parameters:
code
- Code of the emote to check.- Returns:
- True if the emote was in the list.
- Since:
- 1.2
-
getEmoteByName
Returns an emote by its name from the list.- Parameters:
name
- Name of the emote to search.- Returns:
- An emote.
- Since:
- 1.2
-
getEmoteByCode
Returns an emote by its code from the list.- Parameters:
code
- Code of the emote to search.- Returns:
- An emote.
- Since:
- 1.2
-
getEmotesAsList
Returns all the emotes in a list.- Returns:
- A list with all emotes.
- Since:
- 1.2
-
getEmotesAsArray
Returns all the emotes in an array.- Returns:
- An array with all emotes.
- Since:
- 1.2
-