Better Data Sync

This commit is contained in:
RayzsYT committed 2024-05-14 15:31:31 +02:00
1 parent 76e5fdb692
commit b0ed4d6abe
1 file changed
+4 -1
@@ -3,8 +3,10 @@ package de.rayzs.pat.utils.communication.impl;
import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.connection.PluginMessageEvent;
import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.ServerConnection;
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
import com.velocitypowered.api.proxy.server.RegisteredServer;
import com.velocitypowered.api.proxy.server.ServerInfo;
import de.rayzs.pat.plugin.VelocityLoader;
import de.rayzs.pat.utils.communication.Client;
import de.rayzs.pat.utils.communication.ClientCommunication;
@@ -41,7 +43,8 @@ public class VelocityClient implements Client {
try {
DataInputStream input = new DataInputStream(new ByteArrayInputStream(event.getData()));
String information = input.readUTF();
ClientCommunication.receiveInformation(information);
ServerConnection server = (ServerConnection) event.getSource();
ClientCommunication.receiveInformation(server.getServerInfo().getName(), information);
} catch (Throwable throwable) { throwable.printStackTrace(); }
}
}