Package io.github.slaim36.emoteschat.api
Class Emote
java.lang.Object
io.github.slaim36.emoteschat.api.Emote
Represents an emote object.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Emote
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
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
Returns current emote code. Example: ":happy:"- Returns:
- Current emote code.
- Since:
- 1.2
-
getEmote
Returns current emote. Example: "☺"- Returns:
- Current emote.
- Since:
- 1.2
-
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
-