Ursprung
0de2dd0d41
Commit
318a88bd51
@ -6,8 +6,8 @@ import com.comphenix.protocol.events.PacketAdapter;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
import com.comphenix.protocol.events.PacketEvent;
|
||||
import com.comphenix.protocol.reflect.StructureModifier;
|
||||
import com.comphenix.protocol.wrappers.nbt.NbtBase;
|
||||
import com.comphenix.protocol.wrappers.nbt.NbtCompound;
|
||||
import com.comphenix.protocol.wrappers.nbt.NbtFactory;
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.IFightSystem;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
@ -55,11 +55,14 @@ public class TechHider_14 {
|
||||
cached = packet.deepClone();
|
||||
ITechHider.packetCache.put(packet, cached);
|
||||
e.setPacket(cached);
|
||||
StructureModifier<List> list = cached.getSpecificModifier(List.class);
|
||||
List nmsTags = list.read(0);
|
||||
StructureModifier<List<NbtBase<?>>> list = cached.getListNbtModifier();
|
||||
List<NbtBase<?>> nmsTags = list.read(0);
|
||||
boolean changed = false;
|
||||
for(int i = nmsTags.size() - 1; i >= 0; i--){
|
||||
NbtCompound nbt = NbtFactory.fromNMSCompound(nmsTags.get(i));
|
||||
NbtBase<?> nbtBase = nmsTags.get(i);
|
||||
if(!(nbtBase instanceof NbtCompound))
|
||||
throw new SecurityException("Hä?" + nbtBase.getClass().getName());
|
||||
NbtCompound nbt = (NbtCompound) nbtBase;
|
||||
if(Config.HiddenBlockEntities.contains(nbt.getString("id"))){
|
||||
nmsTags.remove(i);
|
||||
changed = true;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren