mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-10 05:39:11 +01:00
Prevent stream allocation when viewable packets are disabled
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
fc3fbe83f0
commit
6ed55a68c0
@ -161,8 +161,10 @@ public final class PacketUtils {
|
||||
|
||||
@ApiStatus.Internal
|
||||
public static void flush() {
|
||||
VIEWABLE_STORAGE_MAP.entrySet().parallelStream().forEach(entry ->
|
||||
entry.getValue().process(entry.getKey()));
|
||||
if (VIEWABLE_PACKET) {
|
||||
VIEWABLE_STORAGE_MAP.entrySet().parallelStream().forEach(entry ->
|
||||
entry.getValue().process(entry.getKey()));
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeFramedPacket(@NotNull ByteBuffer buffer,
|
||||
|
Loading…
Reference in New Issue
Block a user