Solved ProtocolLibrary.getProtocolManager returns null

Discussion in 'Plugin Development' started by Sheepposu, May 24, 2021.

  1. Offline


    I can't figure out why it's returning null. I get the manager in onEnable and create a ProtocolHandler object with that (A class I made for handling the ProtocolManager). I also tried getting the manager in the ProtocolHandler's init method, but it still returned null.
        public void onEnable(){
            ProtocolManager manager = ProtocolLibrary.getProtocolManager();
            protocolHandler = new ProtocolHandler(this, manager);
            protocolHandler.addPacketListener(PacketType.Play.Client.UPDATE_SIGN, new onClientUpdateSign());
    I also have the depend in plugin.yml, the ProtocolLib plugin in my plugins folder, and the dependency in my pom.xml file.
    depend: [ProtocolLib]
    Thanks in advance for any help! this fixed my problem

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 24, 2021

Share This Page