change Bungee API

net.md_5.bungee.BungeeCord -> net.md_5.bungee.api.ProxyServer
This commit is contained in:
JaTiTV 2023-02-27 23:36:41 +01:00
parent 63d80b9e5e
commit 7243e403e1
4 changed files with 9 additions and 14 deletions

View File

@ -1,6 +1,6 @@
package net.t2code.t2codelib.BUNGEE.api.bungeePlayers;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
@ -57,7 +57,7 @@ public class T2CBbungeePlayers implements Listener {
T2CBsend.debug(T2CodeBMain.getPlugin(), "PluginMessage received subChannel: " + value.name());
T2CBsend.debug(T2CodeBMain.getPlugin(), "PluginMessage received input: " + name);
T2CBsend.debug(T2CodeBMain.getPlugin(), "PluginMessage received input2/uuid: " + uuid);
BungeeCord.getInstance().getServers().values().stream().forEach((server) -> {
ProxyServer.getInstance().getServers().values().stream().forEach((server) -> {
server.sendData("t2c:bonlp", stream.toByteArray());
});
}
@ -72,7 +72,7 @@ public class T2CBbungeePlayers implements Listener {
} catch (IOException e) {
Logger.getLogger(e.getMessage());
}
BungeeCord.getInstance().getServers().values().stream().forEach((server) -> {
ProxyServer.getInstance().getServers().values().stream().forEach((server) -> {
server.sendData("t2c:bonlp", stream.toByteArray());
});
}

View File

@ -1,9 +1,8 @@
package net.t2code.t2codelib.BUNGEE.api.update;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import net.t2code.t2codelib.BUNGEE.system.config.T2CBlibConfig;
import net.t2code.t2codelib.SPIGOT.system.config.config.SelectLibConfig;
import net.t2code.t2codelib.T2CupdateObject;
import net.t2code.t2codelib.T2CupdateWebData;
import org.json.JSONArray;
@ -32,7 +31,7 @@ public class T2CBupdateCheckerGit {
RepoURL = RepoURL + "&pre-release=false";
}
String finalRepoURL = RepoURL;
BungeeCord.getInstance().getScheduler().runAsync(this.plugin, () -> {
ProxyServer.getInstance().getScheduler().runAsync(this.plugin, () -> {
try {
URL url = new URL(finalRepoURL);
URLConnection yc = url.openConnection();

View File

@ -1,6 +1,6 @@
package net.t2code.t2codelib.BUNGEE.system.pluginMessaging.commandgui;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
import net.md_5.bungee.api.event.PostLoginEvent;
@ -37,8 +37,7 @@ public class T2CapiCGUI implements Listener {
} catch (IOException e) {
Logger.getLogger(e.getMessage());
}
BungeeCord.getInstance().getServers().values().stream().forEach((server) -> {
ProxyServer.getInstance().getServers().values().stream().forEach((server) -> {
server.sendData("t2c:cguiopl", stream.toByteArray());
});
}
@ -52,7 +51,7 @@ public class T2CapiCGUI implements Listener {
} catch (IOException e) {
Logger.getLogger(e.getMessage());
}
BungeeCord.getInstance().getServers().values().stream().forEach((server) -> {
ProxyServer.getInstance().getServers().values().stream().forEach((server) -> {
server.sendData("t2c:cguiopl", stream.toByteArray());
});
}

View File

@ -1,12 +1,9 @@
package net.t2code.t2codelib.BUNGEE.system.pluginMessaging.opSecurity;
import net.md_5.bungee.BungeeCord;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PluginMessageEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.t2code.t2codelib.BUNGEE.api.messages.T2CBsend;
import java.io.*;
import java.util.logging.Logger;
@ -41,7 +38,7 @@ public class T2CapiOpSecurity implements Listener {
} catch (IOException e) {
Logger.getLogger(e.getMessage());
}
BungeeCord.getInstance().getServers().values().stream().forEach((server) -> {
ProxyServer.getInstance().getServers().values().stream().forEach((server) -> {
server.sendData("t2c:opsec", stream.toByteArray());
});
}