public class Emote
extends java.lang.Object
Constructor and Description |
---|
Emote(java.lang.String name,
org.bukkit.configuration.file.FileConfiguration config)
Returns a new emote by just searching for its name in a config file.
|
Emote(java.lang.String name,
java.lang.String code,
java.lang.String emote,
java.lang.String permission)
Returns a new emote by inputting each property.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canUse(org.bukkit.entity.Player player)
Check if a player can use the current emote.
|
java.lang.String |
getCode()
Returns current emote code.
|
java.lang.String |
getEmote()
Returns current emote.
|
java.lang.String |
getEmoteWithPAPI(org.bukkit.OfflinePlayer player)
Returns current emote with parsed placeholders (if PAPI installed).
|
java.lang.String |
getName()
Returns current emote name.
|
public Emote(java.lang.String name, org.bukkit.configuration.file.FileConfiguration config)
The path to search is "config.emotes.%name%.%property%" where name is the emote name and property is the property to search.
name
- Name of the emote.config
- Config file.public Emote(java.lang.String name, java.lang.String code, java.lang.String emote, java.lang.String permission)
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).public java.lang.String getCode()
public java.lang.String getEmote()
public java.lang.String getEmoteWithPAPI(org.bukkit.OfflinePlayer player)
player
- The player used to parse placeholders (can be null).public java.lang.String getName()
public boolean canUse(org.bukkit.entity.Player player)
player
- The player used to check permission.