Skip to content

Commit

Permalink
Fixed placeholder apis
Browse files Browse the repository at this point in the history
  • Loading branch information
RadBuilder committed Dec 28, 2017
1 parent 22ebc5f commit bd7b377
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MVdWPlaceholderApiHook implements EmojiChatHook {
*/
public MVdWPlaceholderApiHook(EmojiChat plugin) {
for (String key : plugin.getEmojiHandler().getEmojis().keySet()) {
PlaceholderAPI.registerStaticPlaceholders(plugin, key, plugin.getEmojiHandler().getEmojis().get(key).replace(":", ""));
PlaceholderAPI.registerStaticPlaceholders(plugin, key.replace(":", ""), plugin.getEmojiHandler().getEmojis().get(key));
}

plugin.getLogger().info("Hooked " + getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public PlaceholderApiHook(EmojiChat plugin) {
public String onPlaceholderRequest(Player player, String identifier) {
if (player != null && !player.hasPermission("emojichat.use")) // Make sure the player, if specified, has permission to use emojis
return "No Permission";
if (plugin.getEmojiHandler().getEmojis().containsKey(identifier)) {
return plugin.getEmojiHandler().getEmojis().get(identifier);
if (plugin.getEmojiHandler().getEmojis().containsKey(":" + identifier + ":")) {
return plugin.getEmojiHandler().getEmojis().get(":" + identifier + ":");
}
return null;
}
Expand Down

0 comments on commit bd7b377

Please sign in to comment.