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;
|
public static ServerInfo sender;
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@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())) {
|
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());
|
BungeeCore.log(Level.SEVERE, ((InetSocketAddress) event.getSender().getSocketAddress()).getHostString() + " tried to send a plugin message with tag " + event.getTag());
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -54,7 +54,7 @@ public class NetworkReceiver extends BasicListener {
|
|||||||
if(!(event.getSender() instanceof Server))
|
if(!(event.getSender() instanceof Server))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sender = (ServerInfo) event.getSender();
|
sender = ((Server) event.getSender()).getInfo();
|
||||||
NetworkPacket.handle(event.getData());
|
NetworkPacket.handle(event.getData());
|
||||||
sender = null;
|
sender = null;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren