mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-25 09:31:46 +01:00
Got rid of a null-check for blueprints' names
Blueprints' names can no longer be null
This commit is contained in:
parent
f4e3eda98c
commit
2e04619cd9
@ -80,7 +80,7 @@ public class BlueprintsManager {
|
|||||||
*/
|
*/
|
||||||
private final Gson gson;
|
private final Gson gson;
|
||||||
|
|
||||||
private @NonNull BentoBox plugin;
|
private final @NonNull BentoBox plugin;
|
||||||
|
|
||||||
private @NonNull Set<GameModeAddon> blueprintsLoaded;
|
private @NonNull Set<GameModeAddon> blueprintsLoaded;
|
||||||
|
|
||||||
@ -307,9 +307,7 @@ public class BlueprintsManager {
|
|||||||
String fileName = file.getName().substring(0, file.getName().length() - BLUEPRINT_SUFFIX.length());
|
String fileName = file.getName().substring(0, file.getName().length() - BLUEPRINT_SUFFIX.length());
|
||||||
try {
|
try {
|
||||||
Blueprint bp = new BlueprintClipboardManager(plugin, bpf).loadBlueprint(fileName);
|
Blueprint bp = new BlueprintClipboardManager(plugin, bpf).loadBlueprint(fileName);
|
||||||
if (bp.getName() == null) {
|
bp.setName(fileName);
|
||||||
bp.setName(fileName);
|
|
||||||
}
|
|
||||||
blueprints.get(addon).add(bp);
|
blueprints.get(addon).add(bp);
|
||||||
plugin.log("Loaded blueprint '" + bp.getName() + FOR + addon.getDescription().getName());
|
plugin.log("Loaded blueprint '" + bp.getName() + FOR + addon.getDescription().getName());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user