Skip to content

Commit a189aa8

Browse files
committed
Make PlaceholderAPI optional
1 parent 4921987 commit a189aa8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
</div>
1616

17-
> **This plugin requires PlaceholderAPI and Vault to run!**
17+
> **This plugin requires Vault to run!**
1818
1919
## Preview:
2020
![1](assets/gif/ChatFormatterHoverPlayerInfo.gif)
2121
![2](assets/gif/ChatFormatterClickableMessage2.gif)
2222

2323
## Features:
2424

25-
- PlaceholderAPI Support
25+
- [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) Support
2626
- [MiniMessages Support](https://docs.adventure.kyori.net/minimessage/format.html) with Legacy Colors Support!
2727
- Template System
2828
- Custom Placeholders System

chatformatter-core/src/main/java/com/eternalcode/formatter/ChatFormatterPlugin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public ChatFormatterPlugin(Plugin plugin) {
4040

4141
this.placeholderRegistry = new PlaceholderRegistry();
4242
this.placeholderRegistry.stack(pluginConfig);
43-
this.placeholderRegistry.playerStack(new PlaceholderAPIStack());
43+
if (server.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
44+
this.placeholderRegistry.playerStack(new PlaceholderAPIStack());
45+
}
4446
this.templateService = new TemplateService(pluginConfig);
4547
this.rankProvider = new VaultRankProvider(server);
4648
UpdaterService updaterService = new UpdaterService(plugin.getDescription());

chatformatter-paper-plugin/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ bukkit {
1212
prefix = "ChatFormatter"
1313
author = "EternalCodeTeam"
1414
name = "ChatFormatter"
15-
depend = listOf("PlaceholderAPI", "Vault")
15+
depend = listOf("Vault")
16+
softDepend = listOf("PlaceholderAPI")
1617
version = "${project.version}"
1718

1819
commands {

0 commit comments

Comments
 (0)