Closed Xen0Xys closed 2 years ago
You have to listen to the PlayerLoadingCompletedEvent
instead of PlayerJoinEvent
, so your code will be:
@EventHandler
public void onPlayerLoading(PlayerLoadingCompletedEvent e) {
advancementManager.getBaseAdvancement("temp").grant(e.getPlayer());
}
Also, whether the server is in online or offline mode should not matter at all.
So your change didn't change anything for me, but I found out something: When the world is created online and I connect myself, I got the advancements without any problems After that, if I put the server on offline mode, and connect myself with the same username, something is causing troubles with the advancement grant.
So at this point my problem is solved, thanks for your help!
It feels like there's some kind of server bug. Are there any errors in the console? What server software are you using?
No errors, I used paper-1.19.2-177 for my tests
I foud out that the UltimateAdvancementAPI is not working when the server is on offline mode
You can see in the first picture that the advancement is granted, but in the advancement tab there is no advancements (the root advancement is normally grant automaticly but there is nothing on the chat about it):
Thanks for your help!