mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-24 18:09:41 -05:00
Fix loadbefore, soft, and normal dependencies with spaces. Fixes BUKKIT-5418
This change makes the lists of loadbefore, softdependency, and dependency replace the spaces in the names with underscored to reflect the behavior used with names. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
1 parent
05512d64d0
commit
edd5dc6155
2 files changed
+28
-47
No files matched your search
@@ -144,7 +144,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
plugins.put(description.getName(), file);
|
||||
|
||||
Collection<String> softDependencySet = description.getSoftDepend();
|
||||
if (softDependencySet != null) {
|
||||
if (softDependencySet != null && !softDependencySet.isEmpty()) {
|
||||
if (softDependencies.containsKey(description.getName())) {
|
||||
// Duplicates do not matter, they will be removed together if applicable
|
||||
softDependencies.get(description.getName()).addAll(softDependencySet);
|
||||
@@ -154,12 +154,12 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
|
||||
Collection<String> dependencySet = description.getDepend();
|
||||
if (dependencySet != null) {
|
||||
if (dependencySet != null && !dependencySet.isEmpty()) {
|
||||
dependencies.put(description.getName(), new LinkedList<String>(dependencySet));
|
||||
}
|
||||
|
||||
Collection<String> loadBeforeSet = description.getLoadBefore();
|
||||
if (loadBeforeSet != null) {
|
||||
if (loadBeforeSet != null && !loadBeforeSet.isEmpty()) {
|
||||
for (String loadBeforeTarget : loadBeforeSet) {
|
||||
if (softDependencies.containsKey(loadBeforeTarget)) {
|
||||
softDependencies.get(loadBeforeTarget).add(description.getName());
|
||||
|
||||
Reference in new issue
Block a user