Ignore wither skulls for CustomTagFix
This commit is contained in:
parent
141c08ceb8
commit
3c76fde190
@ -1,6 +1,7 @@
|
||||
package mineplex.core;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@ -22,6 +23,7 @@ import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutAttachEntity;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
|
||||
import net.minecraft.server.v1_7_R4.WatchableObject;
|
||||
|
||||
@ -38,6 +40,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
private NautHashMap<Player, NautHashMap<Integer, String>> _entityNameMap = new NautHashMap<Player, NautHashMap<Integer, String>>();
|
||||
private NautHashMap<Player, NautHashMap<Integer, Integer>> _entityVehicleMap = new NautHashMap<Player, NautHashMap<Integer, Integer>>();
|
||||
private NautHashMap<Player, Long> _loggedIn = new NautHashMap<Player, Long>();
|
||||
private HashSet<Integer> _ignoreSkulls = new HashSet<Integer>();
|
||||
|
||||
private Field _destroyId;
|
||||
|
||||
@ -149,7 +152,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
{
|
||||
PacketPlayOutEntityMetadata metaPacket = (PacketPlayOutEntityMetadata)packet;
|
||||
|
||||
if (!_entityMap.get(owner).containsKey(metaPacket.a) && metaPacket.a != 777777)
|
||||
if (!_entityMap.get(owner).containsKey(metaPacket.a) && metaPacket.a != 777777 && !_ignoreSkulls.contains(metaPacket.a))
|
||||
{
|
||||
String entityName = "";
|
||||
boolean nameShowing = false;
|
||||
@ -199,6 +202,14 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
exception.printStackTrace();
|
||||
}
|
||||
}
|
||||
else if (packet instanceof PacketPlayOutSpawnEntity)
|
||||
{
|
||||
PacketPlayOutSpawnEntity spawnPacket = (PacketPlayOutSpawnEntity) packet;
|
||||
if (spawnPacket.j == 66 && spawnPacket.a != 777777)
|
||||
{
|
||||
_ignoreSkulls.add(spawnPacket.a);
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if (packet instanceof PacketPlayOutAttachEntity)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user