Merge branch 'master' into Punishment++
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Commit
d0bbdd903b
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
|||||||
[submodule "CommonCore"]
|
[submodule "CommonCore"]
|
||||||
path = CommonCore
|
path = CommonCore
|
||||||
url = gitea@steamwar.de:SteamWar/CommonCore.git
|
url = https://steamwar.de/devlabs/SteamWar/CommonCore.git
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.listeners;
|
package de.steamwar.bungeecore.listeners;
|
||||||
|
|
||||||
|
import de.steamwar.bungeecore.BungeeCore;
|
||||||
import de.steamwar.messages.ChatSender;
|
import de.steamwar.messages.ChatSender;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
@ -43,14 +44,16 @@ public class BrandListener extends BasicListener {
|
|||||||
if (!(event.getReceiver() instanceof ProxiedPlayer)) {
|
if (!(event.getReceiver() instanceof ProxiedPlayer)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ProxiedPlayer player = (ProxiedPlayer) event.getReceiver();
|
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
String brandString = ChatSender.of(player).parseToLegacy("STEAMWAR_BRAND", ProxyServer.getInstance().getName(), player.getServer().getInfo().getName(), new String(event.getData(), 1, event.getData().length - 1));
|
|
||||||
|
|
||||||
ByteBuf brand = ByteBufAllocator.DEFAULT.heapBuffer();
|
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), () -> {
|
||||||
DefinedPacket.writeString(brandString, brand);
|
ProxiedPlayer player = (ProxiedPlayer) event.getReceiver();
|
||||||
player.sendData(event.getTag(), DefinedPacket.toArray(brand));
|
String brandString = ChatSender.of(player).parseToLegacy("STEAMWAR_BRAND", ProxyServer.getInstance().getName(), player.getServer().getInfo().getName(), new String(event.getData(), 1, event.getData().length - 1));
|
||||||
brand.release();
|
|
||||||
|
ByteBuf brand = ByteBufAllocator.DEFAULT.heapBuffer();
|
||||||
|
DefinedPacket.writeString(brandString, brand);
|
||||||
|
player.sendData(event.getTag(), DefinedPacket.toArray(brand));
|
||||||
|
brand.release();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren