Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
98079a2331
Commit
571fa8c7d1
@ -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;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren