Open Sir-Will opened 4 years ago
The easiest way to reproduce the issue is to just call GriefDefender.getCore().getClaimManager(UUID.randomUUID());
GD does not support claims in unloaded worlds. You should be using
GD does not support claims in unloaded worlds.
This is still a big issue, you are expecting everyone who is using the API to check if the world is loaded before calling getClaimManager()
. With worlds being loaded and unloaded frequently, this will most likely cause the protection to fail at some point.
You should be using
That's what I'm using as workaround but I need to handle claims of unloaded worlds too.
OK, I'll label this as enhancement.
Please provide a use case of accessing unloaded world claims. Currently, GD only loads claims when a world loads.
Checking the owners activity of all claims on startup to remove and handle inactive ones.
If a plugin calls the following method for all worlds GD fails to fully load all claims resulting in no active protection and visualization tools not working.
After some more testing this seems to happen when calling
getClaimManager()
on an unloaded or not existing world.