mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 03:35:11 +01:00
Added some nullability annotations in BlueprintsManager
This commit is contained in:
parent
b2c96b16a0
commit
31d92961b7
@ -141,6 +141,7 @@ public class BlueprintsManager {
|
|||||||
*
|
*
|
||||||
* @param addon the {@link GameModeAddon} to get the blueprint bundles.
|
* @param addon the {@link GameModeAddon} to get the blueprint bundles.
|
||||||
*/
|
*/
|
||||||
|
@NonNull
|
||||||
public Map<String, BlueprintBundle> getBlueprintBundles(@NonNull GameModeAddon addon) {
|
public Map<String, BlueprintBundle> getBlueprintBundles(@NonNull GameModeAddon addon) {
|
||||||
if (!blueprintBundles.containsKey(addon)) {
|
if (!blueprintBundles.containsKey(addon)) {
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
@ -154,6 +155,7 @@ public class BlueprintsManager {
|
|||||||
* @return the default blueprint bundle or null if none
|
* @return the default blueprint bundle or null if none
|
||||||
* @since 1.8.0
|
* @since 1.8.0
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
public BlueprintBundle getDefaultBlueprintBundle(@NonNull GameModeAddon addon) {
|
public BlueprintBundle getDefaultBlueprintBundle(@NonNull GameModeAddon addon) {
|
||||||
if (blueprintBundles.containsKey(addon)) {
|
if (blueprintBundles.containsKey(addon)) {
|
||||||
return blueprintBundles.get(addon).stream().filter(bb -> bb.getUniqueId().equals(DEFAULT_BUNDLE_NAME)).findFirst().orElse(null);
|
return blueprintBundles.get(addon).stream().filter(bb -> bb.getUniqueId().equals(DEFAULT_BUNDLE_NAME)).findFirst().orElse(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user