File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/main/java/ch/njol/skript/util Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -357,8 +357,18 @@ public static Direction deserialize(final String s) {
357
357
}
358
358
}
359
359
}
360
-
361
- public static Expression <Location > combine (final Expression <? extends Direction > dirs , final Expression <? extends Location > locs ) {
360
+
361
+ /*
362
+ * Combines direction and location expressions.
363
+ * Useful for syntaxes to allow Skripters to have more control over their locations.
364
+ * @param dirs The direction expressions to combine.
365
+ * @param locs The location expressions to combine.
366
+ * @return A combined expression or null if any of the inputs are null.
367
+ */
368
+ public static @ Nullable Expression <Location > combine (@ Nullable Expression <? extends Direction > dirs , @ Nullable Expression <? extends Location > locs ) {
369
+ if (dirs == null || locs == null )
370
+ return null ;
371
+
362
372
return new SimpleExpression <Location >() {
363
373
@ SuppressWarnings ("null" )
364
374
@ Override
You can’t perform that action at this time.
0 commit comments