mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 21:27:44 +01:00
Adds method to obtain island via island unique id.
This commit is contained in:
parent
af96055753
commit
f64968c7c7
@ -931,4 +931,14 @@ public class IslandsManager {
|
||||
handler.saveObject(island);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get island by unique id
|
||||
* @param uniqueId - unique id
|
||||
* @return optional island
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public Optional<Island> getIsland(String uniqueId) {
|
||||
return handler.objectExists(uniqueId) ? Optional.ofNullable(handler.loadObject(uniqueId)) : Optional.empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user