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
    • getName

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

      public boolean canUse(org.bukkit.command.CommandSender sender)
      Check if a source object can use the current emote.
      Parameters:
      sender - Source object to check permission.
      Returns:
      True if source object has permission to use the current emote, or it doesn't need any permission to be used.
      Since:
      1.2