Class Emote

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

public class Emote extends Object
Represents an emote object.
  • Constructor Details

    • Emote

      public Emote(String name, org.bukkit.configuration.file.FileConfiguration config)
      Returns a new emote by just searching for its name in a config file.

      The path to search is "config.emotes.%name%.%property%" where name is the emote name and property is the property to search.

      Parameters:
      name - Name of the emote.
      config - Config file.
      Since:
      1.2
    • Emote

      public Emote(String name, String code, String emote, String permission)
      Returns a new emote by inputting each property.
      Parameters:
      name - Name of the emote.
      code - Code of the emote.
      emote - Emote (string to replace code).
      permission - Permission of the emote (maybe null if not needed).
      Since:
      1.2
  • Method Details

    • getCode

      public String getCode()
      Returns current emote code. Example: ":happy:"
      Returns:
      Current emote code.
      Since:
      1.2
    • getEmote

      public String getEmote()
      Returns current emote. Example: "☺"
      Returns:
      Current emote.
      Since:
      1.2
    • getEmoteWithPAPI

      public String getEmoteWithPAPI(org.bukkit.OfflinePlayer player)
      Returns current emote with parsed placeholders (if PAPI installed). Example: "☺"
      Parameters:
      player - The player used to parse placeholders (can be null).
      Returns:
      Current emote with parsed placeholders (if PAPI installed).
      Since:
      1.3
    • getName

      public String getName()
      Returns current emote name. Example: "happy"
      Returns:
      Current emote name.
      Since:
      1.2
    • canUse

      public boolean canUse(org.bukkit.entity.Player player)
      Check if a player can use the current emote.
      Parameters:
      player - The player used to check permission.
      Returns:
      True if the player has permission to use the current emote, or if it doesn't need any permission to be used.
      Since:
      1.2