SteamWar/FightSystem
Archiviert
13
1

Fix chunkhider
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-09-30 13:20:40 +02:00
Ursprung a17e522075
Commit 431fd3697f

Datei anzeigen

@ -30,8 +30,6 @@ import de.steamwar.fightsystem.fight.Fight;
import de.steamwar.fightsystem.fight.FightTeam; import de.steamwar.fightsystem.fight.FightTeam;
import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.FightState;
import de.steamwar.fightsystem.states.StateDependent; import de.steamwar.fightsystem.states.StateDependent;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.UnpooledByteBufAllocator;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Material; import org.bukkit.Material;
@ -131,9 +129,6 @@ public class TechHider extends StateDependent {
).collect(Collectors.toList())); ).collect(Collectors.toList()));
byte[] data = chunkDataHider.apply(mapChunkData.get(packet), mapChunkBitMask.get(packet)); byte[] data = chunkDataHider.apply(mapChunkData.get(packet), mapChunkBitMask.get(packet));
ByteBuf buffer = UnpooledByteBufAllocator.DEFAULT.directBuffer(data.length + 100);
data = new byte[buffer.readableBytes()];
buffer.readBytes(data);
mapChunkData.set(packet, data); mapChunkData.set(packet, data);
return packet; return packet;