-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add placeholderapi for proxy usage
- Loading branch information
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/src/main/kotlin/com/mineinabyss/emojy/EmojyPlaceholders.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.mineinabyss.emojy | ||
|
||
import com.mineinabyss.idofront.textcomponents.serialize | ||
import me.clip.placeholderapi.expansion.PlaceholderExpansion | ||
import org.bukkit.OfflinePlayer | ||
|
||
class EmojyPlaceholders : PlaceholderExpansion() { | ||
override fun getIdentifier() = "emojy" | ||
|
||
override fun getAuthor() = "boy0000" | ||
|
||
override fun getVersion() = emojy.plugin.pluginMeta.version | ||
|
||
override fun onRequest(player: OfflinePlayer?, params: String): String? { | ||
val emote = emojy.emotes.firstOrNull { it.id == params }?.formattedUnicode() ?: emojy.gifs.firstOrNull { it.id == params }?.formattedUnicode() | ||
return emote?.serialize() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters