diff --git a/src/main/java/de/rayzs/pat/utils/communication/impl/VelocityClient.java b/src/main/java/de/rayzs/pat/utils/communication/impl/VelocityClient.java index 9aa946b0..d9ec5cba 100644 --- a/src/main/java/de/rayzs/pat/utils/communication/impl/VelocityClient.java +++ b/src/main/java/de/rayzs/pat/utils/communication/impl/VelocityClient.java @@ -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(); } } }