AcmeProject / WildernessTp

My WildernessTP plugin from spigot
GNU General Public License v3.0
13 stars 16 forks source link

NPE on griefdefender/text api sendMessage #96

Closed hkkongou closed 3 years ago

hkkongou commented 3 years ago

hi, when i use /rtp to a new location, these error? message pop up. These error does not 100% pop up all the time, sometimes /rtp will happen image image

server log: https://paste.gg/p/anonymous/d8e174a41cc34bbfb6c05e8ffcdad2f9

*btw i have a question, do wild tp hook with griefdefender claims?

RoboMWM commented 3 years ago

I highly recommend using GriefPrevention, but yes WildernessTP will work with any region plugin.

Hmm... I wonder how griefdefender is sending a message. Idk if it's paper's "adventure" text API or griefdefender's way of passing in stuff to be sent that's causing issues here...

Ok just looked up his code and it looks like he uses the adventure API directly in his plugin. Interesting. So that API is not liking the fact that the player permissions it's trying to check is not real. I'll have to take a look at whatever the adventure text API is doing...

hkkongou commented 3 years ago

does that mean these error are wildness tp side problem? if so, are you going to fix it?

RoboMWM commented 3 years ago

Not necessarily a wildtp problem but can be caused by something it does sure. It's just figuring out what causes it is a little more annoying since it's not straightforward here... I haven't had time to poke inside of the text API at the moment, but I've heard it has caused issues with other plugins ever since they tried sticking that API straight into Paper.

hkkongou commented 3 years ago

Not necessarily a wildtp problem but can be caused by something it does sure. It's just figuring out what causes it is a little more annoying since it's not straightforward here... I haven't had time to poke inside of the text API at the moment, but I've heard it has caused issues with other plugins ever since they tried sticking that API straight into Paper.

will there be any update soon?

RoboMWM commented 3 years ago

had this amongst other issues bookmarked, sorry haven't looked into it yet. As per the stacktrace it has something to do with SpigotAdapter class line 121 in kyori's text api.

RoboMWM commented 3 years ago

I have no idea what version he's using because I can't find that class in their repo nor in the few branches I checked.

RoboMWM commented 3 years ago

huh, seems his plugin isn't even fully open source as I cannot find his build.gradle file...

hkkongou commented 3 years ago

Should I find Griefdefender staff to look into this ?🤔

RoboMWM commented 3 years ago

ok I found something, he has some weird structure.

Personally I'd just stick with using GP instead but whatever.

RoboMWM commented 3 years ago

Ok I'm looking at the text API and I see no adapter package or any classes named as such, so I'm not really sure how that API is shaded in or what

RoboMWM commented 3 years ago

Finally found it... was part of a different repo named "text-extras"... https://github.com/KyoriPowered/adventure-platform/blob/3.xx/adapter-bukkit/src/main/java/net/kyori/text/adapter/bukkit/SpigotAdapter.java#L121

I'll try implementing a fix, this one won't be as easy to resolve since it's a nested call.

hkkongou commented 3 years ago

excuse me, have you fixed the problem ? i saw there is a new build uploaded on 12 of april, does that contain this fix or not?

RoboMWM commented 3 years ago

Been busy with other priorities. This isn't game breaking (it just causes some log spam) and the fix isn't easy so it's a bit lower on my list of priorities. If you want me to prioritize it you can become a patron on Patreon but until then it's more of a "when I get to it" sort of deal.

Anyways, you can try the latest dev build and see if that works: https://ci.appveyor.com/project/RoboMWM39862/wildernesstp/builds/38852928/artifacts

RoboMWM commented 3 years ago

Yea, I did try something in the latest dev build, did it work?

hkkongou commented 3 years ago

Excuse me, where can I download the latest dev build?

RoboMWM commented 3 years ago

the link is in my prior comment

hkkongou commented 3 years ago

Seems no I cannot find any message about "oversized" in latest.log But I remember I saw it when I just installed the above dev build on the first date, maybe most of the chunk in my server map have been tped by players using RTP so is not appearing anymore 🤔

RoboMWM commented 3 years ago

"Saving oversized chunk" has nothing to do with the error you're seeing btw. That's a different issue.

hkkongou commented 3 years ago

still exist image

image

RoboMWM commented 3 years ago

Ok thank you. I figured that was what would happened but didn't know for sure.

The easy solution for now will cause a "permission denied" message to appear from griefdefender but there's no other way that I know of to deal with this for now. I'll implement that mitigation soon. The other option is to use a different plugin like GriefPrevention.