Class Emotes

java.lang.Object
io.github.slaim36.emoteschat.api.Emotes

public class Emotes extends Object
A class that controls the emotes.
Since:
1.2
  • Field Details

    • instance

      public static Emotes 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

      public boolean addEmote(Emote emote)
      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

      public boolean removeEmote(Emote emote)
      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

      public boolean removeEmoteByName(String name)
      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

      public boolean removeEmoteByCode(String code)
      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

      public boolean isEmotePresent(Emote emote)
      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

      public boolean isEmotePresentByName(String name)
      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

      public boolean isEmotePresentByCode(String code)
      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

      public Emote getEmoteByName(String name)
      Returns an emote by its name from the list.
      Parameters:
      name - Name of the emote to search.
      Returns:
      An emote.
      Since:
      1.2
    • getEmoteByCode

      public Emote getEmoteByCode(String code)
      Returns an emote by its code from the list.
      Parameters:
      code - Code of the emote to search.
      Returns:
      An emote.
      Since:
      1.2
    • getEmotesAsList

      public List<Emote> getEmotesAsList()
      Returns all the emotes in a list.
      Returns:
      A list with all emotes.
      Since:
      1.2
    • getEmotesAsArray

      public Emote[] getEmotesAsArray()
      Returns all the emotes in an array.
      Returns:
      An array with all emotes.
      Since:
      1.2