Fixing softreload
Dieser Commit ist enthalten in:
Ursprung
9dae263d9b
Commit
b8d343f3f1
@ -1,9 +1,8 @@
|
||||
package de.steamwar.bungeecore;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import net.md_5.bungee.api.event.ProxyReloadEvent;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.plugin.*;
|
||||
import net.md_5.bungee.event.EventHandler;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
|
||||
import java.io.File;
|
||||
@ -18,7 +17,7 @@ import java.util.jar.JarFile;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class Persistent extends Plugin implements Listener {
|
||||
public class Persistent extends Plugin {
|
||||
|
||||
private static Persistent instance;
|
||||
private static String chatPrefix = "";
|
||||
@ -27,15 +26,9 @@ public class Persistent extends Plugin implements Listener {
|
||||
@Override
|
||||
public void onEnable(){
|
||||
instance = this;
|
||||
}
|
||||
|
||||
getProxy().getPluginManager().registerCommand(this, new Command("softreload", "bungeecore.softreload"){
|
||||
@Override
|
||||
public void onDisable(){
|
||||
Subserver.shutdown();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onGReload(ProxyReloadEvent e){
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// Copied from https://www.spigotmc.org/resources/bungeepluginmanager-manage-your-bungee-plugin-at-runtime.63861/
|
||||
PluginManager pluginManager = getProxy().getPluginManager();
|
||||
Plugin bungeecore = pluginManager.getPlugin("BungeeCore");
|
||||
@ -136,6 +129,13 @@ public class Persistent extends Plugin implements Listener {
|
||||
getLogger().log(Level.SEVERE, "Failed to load plugin", t);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable(){
|
||||
Subserver.shutdown();
|
||||
}
|
||||
|
||||
public static void setLobbyServer(String lobbyServer) {
|
||||
Persistent.lobbyServer = lobbyServer;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren