Don't check source if plugin is velocity

This commit is contained in:
Roman Zhuravlev 2025-09-03 19:37:14 +05:00
parent f8dc4752c1
commit dfca65436f

View file

@ -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)