Got rid of a null-check for blueprints' names

Blueprints' names can no longer be null
This commit is contained in:
Florian CUNY 2020-06-02 10:29:05 +02:00
parent f4e3eda98c
commit 2e04619cd9

View File

@ -80,7 +80,7 @@ public class BlueprintsManager {
*/
private final Gson gson;
private @NonNull BentoBox plugin;
private final @NonNull BentoBox plugin;
private @NonNull Set<GameModeAddon> blueprintsLoaded;
@ -307,9 +307,7 @@ public class BlueprintsManager {
String fileName = file.getName().substring(0, file.getName().length() - BLUEPRINT_SUFFIX.length());
try {
Blueprint bp = new BlueprintClipboardManager(plugin, bpf).loadBlueprint(fileName);
if (bp.getName() == null) {
bp.setName(fileName);
}
bp.setName(fileName);
blueprints.get(addon).add(bp);
plugin.log("Loaded blueprint '" + bp.getName() + FOR + addon.getDescription().getName());
} catch (Exception e) {