mirror of
https://github.com/RayzsYT/ProAntiTab.git
synced 2026-12-01 12:59:43 -05:00
Security
This commit is contained in:
1 parent
5918df2dc0
commit
c87c208d25
2 files changed
+4
-2
No files matched your search
@@ -8,6 +8,7 @@ import de.rayzs.pat.utils.message.MessageTranslator;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||
import net.md_5.bungee.api.connection.Server;
|
||||
import net.md_5.bungee.api.scheduler.ScheduledTask;
|
||||
import net.md_5.bungee.protocol.ProtocolConstants;
|
||||
|
||||
@@ -46,8 +47,8 @@ public class BungeeServerBrand implements ServerBrand {
|
||||
ProxiedPlayer player = (ProxiedPlayer) playerObj;
|
||||
|
||||
String serverName = "", playerName = player.getName(), customBrand = BRAND.replace("%player%", playerName).replace("%server%", serverName);
|
||||
ServerInfo serverInfo = player.getServer().getInfo();
|
||||
if(serverInfo != null) serverName = serverInfo.getName();
|
||||
Server server = player.getServer();
|
||||
if(server != null) serverName = server.getInfo().getName();
|
||||
|
||||
PacketUtils.BrandManipulate serverBrand = new PacketUtils.BrandManipulate(customBrand);
|
||||
String brand = player.getPendingConnection().getVersion() >= ProtocolConstants.MINECRAFT_1_13 ? "minecraft:brand" : "MC|Brand";
|
||||
|
||||
@@ -31,6 +31,7 @@ public class BukkitClient implements Client, PluginMessageListener {
|
||||
try {
|
||||
ByteArrayDataInput input = ByteStreams.newDataInput(bytes);
|
||||
String information = input.readUTF();
|
||||
System.out.println("IN: " + information);
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(BukkitLoader.getPlugin(), () -> ClientCommunication.receiveInformation("proxy", information));
|
||||
} catch (Throwable throwable) { throwable.printStackTrace(); }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user