Fixed plugins name could be null
@@ -131,12 +131,6 @@ public ModMetadata getMetadata() {
@SuppressWarnings("unchecked")
public void bindMetadata(MetadataCollection mc) {
this.metadata = mc.getMetadataForId(this.id, this.descriptor);
- if (this.metadata.autogenerated) {
- if (!this.invalid) {
- SpongeImpl.getLogger().warn("Plugin '{}' seems to be missing a valid mcmod.info metadata file. This is not a problem when testing "
- + "plugins, however it is recommended to include one in public plugins.\n"
- + "Please see https://docs.spongepowered.org/master/en/plugin/plugin-meta.html for details.", this.id);
- }
if (isNullOrEmpty(this.metadata.name)) {
this.metadata.name = this.id;
@@ -146,6 +140,13 @@ public void bindMetadata(MetadataCollection mc) {
this.metadata.version = "";
}
+ if (this.metadata.autogenerated) {
+ if (!this.invalid) {
+ SpongeImpl.getLogger().warn("Plugin '{}' seems to be missing a valid mcmod.info metadata file. This is not a problem when testing "
+ + "plugins, however it is recommended to include one in public plugins.\n"
+ + "Please see https://docs.spongepowered.org/master/en/plugin/plugin-meta.html for details.", this.id);
+ }
+
// Version is set in the dummy automatically (see getMetadataForId)
this.metadata.description = getDescriptorValue("description");
this.metadata.url = getDescriptorValue("url");
