Add PacketPlayOutCamera for locking view to entity
This commit is contained in:
parent
63107b0c26
commit
7841b17d03
@ -51,6 +51,7 @@ public class PacketHandler extends MiniPlugin
|
||||
Method method = ProtocolInjector.class.getDeclaredMethod("addPacket", EnumProtocol.class,boolean.class, int.class, Class.class);
|
||||
method.setAccessible(true);
|
||||
|
||||
method.invoke(null, EnumProtocol.PLAY, true, 67, PacketPlayOutCamera.class);
|
||||
method.invoke(null, EnumProtocol.PLAY, true, 68, PacketPlayOutWorldBorder.class);
|
||||
|
||||
// EnumProtocol.PLAY.b().put(68, PacketPlayOutWorldBorder.class);
|
||||
|
@ -0,0 +1,44 @@
|
||||
package mineplex.core.packethandler;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
import net.minecraft.server.v1_7_R4.Packet;
|
||||
import net.minecraft.server.v1_7_R4.PacketDataSerializer;
|
||||
import net.minecraft.server.v1_7_R4.PacketListener;
|
||||
|
||||
public class PacketPlayOutCamera extends Packet
|
||||
{
|
||||
public int a;
|
||||
|
||||
public PacketPlayOutCamera()
|
||||
{
|
||||
}
|
||||
|
||||
public PacketPlayOutCamera(int id)
|
||||
{
|
||||
a = id;
|
||||
}
|
||||
|
||||
public PacketPlayOutCamera(Entity paramEntity)
|
||||
{
|
||||
this.a = paramEntity.getEntityId();
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer paramPacketDataSerializer)
|
||||
{
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer paramPacketDataSerializer)
|
||||
{
|
||||
paramPacketDataSerializer.b(this.a);
|
||||
}
|
||||
|
||||
public void a(PacketListener paramPacketListenerPlayOut)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handle(PacketListener arg0)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user