LookupResult
Result of a lenient ID lookup, like Levels.lookupTrack.
If you only need an ID that works right now, take foundId:
String configuredTrack = config.getString("track", ""); // "Woodcutting"
Key trackId = levels.lookupTrack(configuredTrack).getFoundId(); // mcmmo:woodcutting
if (trackId == null) return;Content copied to clipboard
To tell a server owner what is wrong with their config, check the status.
The result is a snapshot. Plugins may load their content after the server start and change it on reload, so the same value may give another result later. Don't look up IDs in onLoad.
Since
0.12.0
Properties
Link copied to clipboard
The ID if the status is LookupStatus.FOUND, otherwise null.
Link copied to clipboard
Existing IDs matching the value: one for LookupStatus.FOUND, several for LookupStatus.AMBIGUOUS, otherwise empty.
Link copied to clipboard
What the lookup ended with.