EbonJaeger / perworldinventory-kt

Multi-world inventory plugin for Spigot written in Kotlin.
MIT License
46 stars 35 forks source link

PerWorldInventoryAPI#getGroup is always null #151

Closed DisabledMallis closed 3 years ago

DisabledMallis commented 5 years ago

Describe the bug the PerWorldInventoryAPI#getGroup will always result in null

To Reproduce Steps to reproduce the behavior:

  1. use the getGroup method how you normally would, (api.getGroup("GroupName"))
  2. view error

Expected behavior Id imagine it would return a valid group where i can add worlds to via api.

Plugin version Using latest version on spigot, 2.3.1

Server version Paper-637, Minecraft 1.13.2

Additional context and logs Logs: https://paste.ubuntu.com/p/HRpRgp8zJD/

I did add the plugin as a dependancy in my plugin.yml, as well as i tried using a group i had created in game.

Edit: wanted to add, i know that this is null from trial and error.

Edit 2: Workaround You can use PerWorldInventoryAPI#getGroupFromWorld to create a group on the fly and add to that group with the expected result.

EbonJaeger commented 5 years ago

It's possible that when you're calling that method, the groups haven't been loaded yet. As a temporary workaround, you could try waiting at least 2 ticks. I'll see if I can make things happen a bit faster.