Don't check source if plugin is velocity
This commit is contained in:
parent
f8dc4752c1
commit
dfca65436f
1 changed files with 9 additions and 2 deletions
|
|
@ -24,9 +24,16 @@ public class VelocityPluginDescription implements ServerUtilsPluginDescription {
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|
||||||
Optional<Path> sourceOptional = description.getSource();
|
Optional<Path> sourceOptional = description.getSource();
|
||||||
if (!sourceOptional.isPresent()) throw new InvalidPluginDescriptionException("Source path is null");
|
if (!sourceOptional.isPresent()) {
|
||||||
|
if (description.getId().equals("velocity")) {
|
||||||
|
this.file = null;
|
||||||
|
} else {
|
||||||
|
throw new InvalidPluginDescriptionException("Source path is null");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.file = sourceOptional.get().toFile();
|
||||||
|
}
|
||||||
|
|
||||||
this.file = sourceOptional.get().toFile();
|
|
||||||
this.author = String.join(", ", description.getAuthors());
|
this.author = String.join(", ", description.getAuthors());
|
||||||
this.dependencies = description.getDependencies().stream()
|
this.dependencies = description.getDependencies().stream()
|
||||||
.map(PluginDependency::getId)
|
.map(PluginDependency::getId)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue