If packets are null. Remake the containers boy!
This commit is contained in:
parent
b5c8d69398
commit
4bc09faa37
@ -711,18 +711,19 @@ public class PacketsManager {
|
|||||||
if (fakeId > 0) {
|
if (fakeId > 0) {
|
||||||
// Here I grab the packets to convert them to, So I can display them as if the disguise sent them.
|
// Here I grab the packets to convert them to, So I can display them as if the disguise sent them.
|
||||||
PacketContainer[] packets = transformPacket(event.getPacket(), observer, observer);
|
PacketContainer[] packets = transformPacket(event.getPacket(), observer, observer);
|
||||||
if (packets != null) {
|
if (packets == null) {
|
||||||
for (int i = 0; i < packets.length; i++) {
|
packets = new PacketContainer[] { event.getPacket() };
|
||||||
PacketContainer packet = packets[i];
|
}
|
||||||
if (packet.equals(event.getPacket())) {
|
for (int i = 0; i < packets.length; i++) {
|
||||||
packet = packet.deepClone();
|
PacketContainer packet = packets[i];
|
||||||
}
|
if (packet.equals(event.getPacket())) {
|
||||||
packet.getModifier().write(0, fakeId);
|
packet = packet.deepClone();
|
||||||
try {
|
}
|
||||||
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
packet.getModifier().write(0, fakeId);
|
||||||
} catch (InvocationTargetException e) {
|
try {
|
||||||
e.printStackTrace();
|
ProtocolLibrary.getProtocolManager().sendServerPacket(observer, packet, false);
|
||||||
}
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event.getPacketType() == PacketType.Play.Server.ENTITY_METADATA) {
|
if (event.getPacketType() == PacketType.Play.Server.ENTITY_METADATA) {
|
||||||
|
Loading…
Reference in New Issue
Block a user