mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-09 17:01:51 +01:00
Revert "Adds method to obtain island via island unique id."
This reverts commit f64968c7c7
.
This commit is contained in:
parent
46f39c3649
commit
7b612c102e
@ -702,17 +702,17 @@ public class IslandsManager {
|
|||||||
// Only load non-quarantined island
|
// Only load non-quarantined island
|
||||||
// TODO: write a purge admin command to delete these records
|
// TODO: write a purge admin command to delete these records
|
||||||
handler.loadObjects().stream().filter(i -> !i.isDoNotLoad()).forEach(island -> {
|
handler.loadObjects().stream().filter(i -> !i.isDoNotLoad()).forEach(island -> {
|
||||||
if (!islandCache.addIsland(island)) {
|
if (!islandCache.addIsland(island)) {
|
||||||
// Quarantine the offending island
|
// Quarantine the offending island
|
||||||
toQuarantine.add(island);
|
toQuarantine.add(island);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!toQuarantine.isEmpty()) {
|
if (!toQuarantine.isEmpty()) {
|
||||||
plugin.logError(toQuarantine.size() + " islands could not be loaded successfully; quarantining.");
|
plugin.logError(toQuarantine.size() + " islands could not be loaded successfully; quarantining.");
|
||||||
toQuarantine.forEach(i -> {
|
toQuarantine.forEach(i -> {
|
||||||
i.setDoNotLoad(true);
|
i.setDoNotLoad(true);
|
||||||
handler.saveObject(i);
|
handler.saveObject(i);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -931,14 +931,4 @@ public class IslandsManager {
|
|||||||
handler.saveObject(island);
|
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