13
0

Fix for newer BTLP versions
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

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