The manager is always null :( (Please help me , i have a family) #2520
Unanswered
sussolinoss
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Main Class:
public final class JuicePvPAC extends JavaPlugin {
}
ProtocolLib Hook:
public final class ProtocolLibHook {
public static void register() {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
if (manager != null) {
manager.addPacketListener(new PacketAdapter(JuicePvPAC.plugin, PacketType.Play.Client.USE_ENTITY) {
@OverRide
public void onPacketReceiving(PacketEvent e) {
if (e.getPacketType() == PacketType.Play.Client.USE_ENTITY) {
PacketContainer packet = e.getPacket();
UUID id = packet.getUUIDs().read(0);
Entity t = Bukkit.getEntity(id);
Player p = e.getPlayer();
}
Beta Was this translation helpful? Give feedback.
All reactions