1
0

Fix for newer BTLP versions

Dieser Commit ist enthalten in:
Lixfel 2022-05-08 14:39:19 +02:00
Ursprung b978d75dd7
Commit 85cfd4cbe5

Datei anzeigen

@ -19,10 +19,10 @@
package de.steamwar.bungeecore;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.bungeepluginmanager.ModifiedPluginEventBus;
import net.md_5.bungee.api.bungeepluginmanager.PluginUtils;
import net.md_5.bungee.api.bungeepluginmanager.ReflectionUtils;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.plugin.Command;
import net.md_5.bungee.api.plugin.Plugin;
import net.md_5.bungee.api.plugin.PluginManager;
@ -35,11 +35,15 @@ public class Persistent extends Plugin {
private static String chatPrefix = "";
private static String lobbyServer = "";
@Override
public void onLoad() {
ReflectionUtils.setFieldValue(getProxy().getPluginManager(), "eventBus", new ModifiedPluginEventBus());
}
@Override
public void onEnable(){
instance = this;
ReflectionUtils.setFieldValue(getProxy().getPluginManager(), "eventBus", new ModifiedPluginEventBus());
getProxy().getPluginManager().registerCommand(this, new Command("softreload", "bungeecore.softreload"){
@Override
public void execute(CommandSender sender, String[] args) {