Tutorial results in NPE
danvanbueren opened this issue ยท 2 comments
Bug Description
NPE when invoking addPacketListener
because protocolManager
is null.
To Reproduce
- Attempt to follow tutorial in new project. See https://pastebin.com/H9ZS79Kv
- Run server with this plugin and encounter NPE. See https://pastebin.com/xwyN2xUW
Expected Behavior
Following the basic tutorial will yield a NullPointerException.
Screenshots
N/A
Version Info
https://pastebin.com/2nkpaTsz
Additional context
For starters... thank you derklaro for the ridiculous amount of effort it probably takes to maintain this... I know it probably feels thankless sometimes. I am assuming I'm doing something wrong here and simply making a fool of myself but in the case that I'm not, I'm posting this here for reference. I'd love to use this tool, as it will accomplish exactly what I've been looking for. However, things aren't looking good for me here. Thank you!
Hey,
I suppose that you accidentally shaded ProtocolLib into your plugin, try setting the dependency scope of ProtocolLib to provided
:
<dependency>
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<version>$version$</version>
<scope>provided</scope>
</dependency>
(Probably a good thing to put in the readme as well)
For starters... thank you derklaro for the ridiculous amount of effort it probably takes to maintain this...
Thanks, but I'm not the only one who actively works on this, there are people like you who submit problems they stumble upon and I think we should all thank dmulloy2 for continuing this lib back in 2014!
Well... that fixed it. I am but another fool bumbling through things I don't understand. Guess I should read up on Maven.
Also true, if I was going to thank someone, I should've thanked the whole team. I just saw your name attached to most issue responses I was looking at before posting this. Thanks guys, cheers!