Help with error in console

Hello people , so i found a plugin that i want to use for my server but its been abandonded it seems for years now. So i tried updating it myself for 1.16 and almost everything works fine expect one thing.

This is the part thats causing the error

even though i don’t see any errors in eclipse this is what i see in the server console when the plugin is running:

Can someone help me fix it?

Clearly something is null, but without even knowing what is on line 103, since they are not in your screenshot, it’s hard to tell.

The easiest way to know what is null, is to run your server on a newer Java version (14+) which has better NPE messages. In Java 14 you need to enable them with -XX:+ShowCodeDetailsInExceptionMessages but I believe in newer versions they are enabled by default.

This should tell you what exactly is null there.

Here is a new screenshot with the numbers of the lines maybe it will help my bad for not showing it in the previous image

My guess is that you don’t have any item in your main hand? Or maybe the lore is null (I forget if it can return null). If you’ll do what I said with running on modern Java, then you should get more info.

You should do checks using PDC and not lore anyway.

Alright i’ll see what i can , thanks for the help :smile: