@@ -104,6 +104,7 @@ public void reload(FileConfiguration fileConfiguration) {
104
104
}
105
105
integerMap .put (key , value );
106
106
}
107
+ swapAeraValueIfNeeded ();
107
108
108
109
stringMap .clear ();
109
110
for (StringKeys key : StringKeys .values ()) {
@@ -173,6 +174,27 @@ public void reload(FileConfiguration fileConfiguration) {
173
174
}
174
175
}
175
176
177
+ private void swapAeraValueIfNeeded () {
178
+ if (getInt (IntegerKeys .GENERATION_AREA_MIN_X ) > getInt (IntegerKeys .GENERATION_AREA_MAX_X )) {
179
+ Underilla .warning ("Min X is greater than max X. Swapping values." );
180
+ int temp = getInt (IntegerKeys .GENERATION_AREA_MIN_X );
181
+ integerMap .put (IntegerKeys .GENERATION_AREA_MIN_X , getInt (IntegerKeys .GENERATION_AREA_MAX_X ));
182
+ integerMap .put (IntegerKeys .GENERATION_AREA_MAX_X , temp );
183
+ }
184
+ if (getInt (IntegerKeys .GENERATION_AREA_MIN_Y ) > getInt (IntegerKeys .GENERATION_AREA_MAX_Y )) {
185
+ Underilla .warning ("Min Y is greater than max Y. Swapping values." );
186
+ int temp = getInt (IntegerKeys .GENERATION_AREA_MIN_Y );
187
+ integerMap .put (IntegerKeys .GENERATION_AREA_MIN_Y , getInt (IntegerKeys .GENERATION_AREA_MAX_Y ));
188
+ integerMap .put (IntegerKeys .GENERATION_AREA_MAX_Y , temp );
189
+ }
190
+ if (getInt (IntegerKeys .GENERATION_AREA_MIN_Z ) > getInt (IntegerKeys .GENERATION_AREA_MAX_Z )) {
191
+ Underilla .warning ("Min Z is greater than max Z. Swapping values." );
192
+ int temp = getInt (IntegerKeys .GENERATION_AREA_MIN_Z );
193
+ integerMap .put (IntegerKeys .GENERATION_AREA_MIN_Z , getInt (IntegerKeys .GENERATION_AREA_MAX_Z ));
194
+ integerMap .put (IntegerKeys .GENERATION_AREA_MAX_Z , temp );
195
+ }
196
+ }
197
+
176
198
public void initSetEntityType (FileConfiguration fileConfiguration ) {
177
199
for (SetEntityTypeKeys key : SetEntityTypeKeys .values ()) {
178
200
List <String > regexList = new ArrayList <>();
0 commit comments