SteamWar/BungeeCore
Archiviert
13
2

Fix concurrency, fix cast
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-14 08:56:09 +02:00
Ursprung 98079a2331
Commit 571fa8c7d1

Datei anzeigen

@ -41,7 +41,7 @@ public class NetworkReceiver extends BasicListener {
public static ServerInfo sender;
@EventHandler(priority = EventPriority.HIGHEST)
public void onPluginMessage(PluginMessageEvent event) {
public synchronized void onPluginMessage(PluginMessageEvent event) {
if (blockedTags.contains(event.getTag()) && !allowedAddresses.contains(((InetSocketAddress) event.getSender().getSocketAddress()).getHostString())) {
BungeeCore.log(Level.SEVERE, ((InetSocketAddress) event.getSender().getSocketAddress()).getHostString() + " tried to send a plugin message with tag " + event.getTag());
event.setCancelled(true);
@ -54,7 +54,7 @@ public class NetworkReceiver extends BasicListener {
if(!(event.getSender() instanceof Server))
return;
sender = (ServerInfo) event.getSender();
sender = ((Server) event.getSender()).getInfo();
NetworkPacket.handle(event.getData());
sender = null;
}