aadnk / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
288 stars 92 forks source link

ProtocolLibrary.getProtocolManager(); return null? #189

Closed GoldenGamerLP closed 2 years ago

GoldenGamerLP commented 3 years ago

Describe the bug If i want to get the ProtocollManager via the "ProtocolLibrary.getProtocolManager();" method, it always return null to me. Im using the latest dev Build (Current version: 4.7.0-SNAPSHOT-b521)

To Reproduce Steps to reproduce the behavior:

  1. Load the latest Dev Build (Current version: 4.7.0-SNAPSHOT-b521) and start the 1.17 Server
  2. Follow the steps on the tutorial (Getting the ProtocollManager adding ProtocollLib as a depend in the plugin.yml)
  3. Try to acces the "ProtocolLibrary.getProtocolManager();" method and try to use it
  4. It throws you the error that the return of "ProtocolLibrary.getProtocolManager();" is null

Expected behavior It should simply return the ProtocollManager

Screenshots image image image

Version Info https://paste.helpch.at/sikosihixi.rb

Additional context I used the onEnable method in the Plugin Main too, but that didnt change anything.

MiniDigger commented 3 years ago

dependdepend? what is that supposed to be? its just 'depend' https://bukkit.fandom.com/wiki/Plugin_YAML

GoldenGamerLP commented 3 years ago

I already thought you would mention that, i saw the error later too, i corrected it, and it didnt work either

Lori3f6 commented 2 years ago

It may caused by the incorrect configurations of the build tool. You may need to make sure that your build tool doesn't shade(include) classes of Protocollib in the packaged jar

widz-a commented 2 years ago

Check your pom.xml, make sure the scope is provided image