diff --git a/README.md b/README.md index ae8cc27..4713905 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ -> ⚠ **This plugin requires PlaceholderAPI and Vault to run!** +> ⚠ **This plugin requires Vault to run!** ## Preview: ![1](assets/gif/ChatFormatterHoverPlayerInfo.gif) @@ -22,7 +22,7 @@ ## Features: -- PlaceholderAPI Support +- [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) Support - [MiniMessages Support](https://docs.adventure.kyori.net/minimessage/format.html) with Legacy Colors Support! - Template System - Custom Placeholders System diff --git a/chatformatter-core/src/main/java/com/eternalcode/formatter/ChatFormatterPlugin.java b/chatformatter-core/src/main/java/com/eternalcode/formatter/ChatFormatterPlugin.java index f5a10b2..bf4e87d 100644 --- a/chatformatter-core/src/main/java/com/eternalcode/formatter/ChatFormatterPlugin.java +++ b/chatformatter-core/src/main/java/com/eternalcode/formatter/ChatFormatterPlugin.java @@ -40,7 +40,9 @@ public ChatFormatterPlugin(Plugin plugin) { this.placeholderRegistry = new PlaceholderRegistry(); this.placeholderRegistry.stack(pluginConfig); - this.placeholderRegistry.playerStack(new PlaceholderAPIStack()); + if (server.getPluginManager().isPluginEnabled("PlaceholderAPI")) { + this.placeholderRegistry.playerStack(new PlaceholderAPIStack()); + } this.templateService = new TemplateService(pluginConfig); this.rankProvider = new VaultRankProvider(server); UpdaterService updaterService = new UpdaterService(plugin.getDescription()); diff --git a/chatformatter-paper-plugin/build.gradle.kts b/chatformatter-paper-plugin/build.gradle.kts index 5f53799..6c85686 100644 --- a/chatformatter-paper-plugin/build.gradle.kts +++ b/chatformatter-paper-plugin/build.gradle.kts @@ -12,7 +12,8 @@ bukkit { prefix = "ChatFormatter" author = "EternalCodeTeam" name = "ChatFormatter" - depend = listOf("PlaceholderAPI", "Vault") + depend = listOf("Vault") + softDepend = listOf("PlaceholderAPI") version = "${project.version}" commands {