Add a polite notice if you don't have ProtocolLib
All checks were successful
/ deploy (push) Successful in 1m19s

This commit is contained in:
Minecon724 2024-12-13 16:51:20 +01:00
parent 8af95e3ac1
commit c22e95af3e
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
2 changed files with 8 additions and 1 deletions

View file

@ -34,6 +34,13 @@ public class TweaksPlugin extends MStatsPlugin {
public void onEnable() {
long start = System.nanoTime();
if (getServer().getPluginManager().getPlugin("ProtocolLib") == null) {
getLogger().severe("ProtocolLib is required for this plugin.");
getLogger().severe("https://www.spigotmc.org/resources/protocollib.1997/");
getServer().getPluginManager().disablePlugin(this);
return;
}
TweaksConfig config = TweaksConfig.load(this);
new Language(Locale.US); // TODO

View file

@ -5,7 +5,7 @@ website: https://www.spigotmc.org/resources/tweaks724.121057/
main: eu.m724.tweaks.TweaksPlugin
api-version: 1.21.1
depend: [ProtocolLib]
softdepend: [ProtocolLib]
libraries:
- eu.m724:mstats-spigot:0.1.0