catch IAE from empty transformation builder
This commit is contained in:
parent
d9fcf39f65
commit
f27aa33aba
4 changed files with 16 additions and 10 deletions
|
@ -835,10 +835,10 @@ index 0000000000000000000000000000000000000000..69add4a7f1147015806bc9b63a8340d1
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5069e55e46b628dc0fdaccbfc279033f60924eb8
|
||||
index 0000000000000000000000000000000000000000..4ee18a87d3160ef41654116f033a01f2e52513f2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -0,0 +1,369 @@
|
||||
@@ -0,0 +1,375 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import com.google.common.base.Suppliers;
|
||||
|
@ -1056,7 +1056,13 @@ index 0000000000000000000000000000000000000000..5069e55e46b628dc0fdaccbfc279033f
|
|||
+ // ADD FUTURE TRANSFORMS HERE (these transforms run after the defaults have been merged into the node)
|
||||
+ DEFAULT_AWARE_TRANSFORMATIONS.forEach(transform -> transform.apply(builder, contextMap, defaultsNode));
|
||||
+
|
||||
+ builder.build().apply(worldNode);
|
||||
+ ConfigurationTransformation transformation;
|
||||
+ try {
|
||||
+ transformation = builder.build(); // build throws IAE if no actions were provided (bad zml)
|
||||
+ } catch (IllegalArgumentException ignored) {
|
||||
+ return;
|
||||
+ }
|
||||
+ transformation.apply(worldNode);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue