1
0
Fork 0
mirror of https://github.com/xHyroM/lighteco.git synced 2024-11-21 22:41:06 +01:00

fix(bukkit): dont load commandapi twice

This commit is contained in:
Jozef Steinhübl 2023-10-07 12:56:28 +02:00
parent 58cf77e2b9
commit 4c832f11f1
No known key found for this signature in database
GPG key ID: E944BC293F5FF7E7

View file

@ -1,7 +1,5 @@
package dev.xhyrom.lighteco.bukkit; package dev.xhyrom.lighteco.bukkit;
import dev.jorel.commandapi.CommandAPI;
import dev.jorel.commandapi.CommandAPIBukkitConfig;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
// Used inside plugin.yml // Used inside plugin.yml
@ -16,20 +14,15 @@ public class BukkitLightEcoLoader extends JavaPlugin {
@Override @Override
public void onLoad() { public void onLoad() {
this.bootstrap.onLoad(); this.bootstrap.onLoad();
CommandAPI.onLoad(new CommandAPIBukkitConfig(this)
.verboseOutput(this.bootstrap.getPlugin().getConfig().debug)
);
} }
@Override @Override
public void onEnable() { public void onEnable() {
CommandAPI.onEnable();
this.bootstrap.onEnable(); this.bootstrap.onEnable();
} }
@Override @Override
public void onDisable() { public void onDisable() {
CommandAPI.onDisable();
this.bootstrap.onDisable(); this.bootstrap.onDisable();
} }
} }