Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
correct default to join-classpath: true for dependencies (#9279)
Dieser Commit ist enthalten in:
Ursprung
38b2754b28
Commit
483368e480
@ -5280,31 +5280,29 @@ index 0000000000000000000000000000000000000000..a0109a388188b0808900405d334a4031
|
|||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java
|
diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..594357f65813bd6287e982af12e4e5eaf443240e
|
index 0000000000000000000000000000000000000000..957fb5e60ba6bd8760e8f6016d7bb6e8a405e163
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java
|
+++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,30 @@
|
||||||
+package io.papermc.paper.plugin.provider.configuration.type;
|
+package io.papermc.paper.plugin.provider.configuration.type;
|
||||||
+
|
+
|
||||||
|
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
+import org.checkerframework.framework.qual.DefaultQualifier;
|
||||||
+import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
+import org.spongepowered.configurate.objectmapping.ConfigSerializable;
|
||||||
+
|
+
|
||||||
|
+import static java.util.Objects.requireNonNullElse;
|
||||||
|
+
|
||||||
|
+@DefaultQualifier(NonNull.class)
|
||||||
+@ConfigSerializable
|
+@ConfigSerializable
|
||||||
+public record DependencyConfiguration(
|
+public record DependencyConfiguration(
|
||||||
+ LoadOrder load,
|
+ LoadOrder load,
|
||||||
+ boolean required,
|
+ Boolean required,
|
||||||
+ boolean joinClasspath
|
+ Boolean joinClasspath
|
||||||
+) {
|
+) {
|
||||||
+
|
+ @SuppressWarnings("DataFlowIssue") // incorrect intellij inspections
|
||||||
+ public DependencyConfiguration(boolean required, boolean joinClasspath) {
|
+ public DependencyConfiguration {
|
||||||
+ this(LoadOrder.OMIT, required, joinClasspath);
|
+ required = requireNonNullElse(required, true);
|
||||||
+ }
|
+ joinClasspath = requireNonNullElse(joinClasspath, true);
|
||||||
+
|
|
||||||
+ public DependencyConfiguration(boolean required) {
|
|
||||||
+ this(required, true);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public DependencyConfiguration() {
|
|
||||||
+ this(true);
|
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @ConfigSerializable
|
+ @ConfigSerializable
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren