Add missing @Nullability annotations to arg lists

The *contents* of the array is nullable, but the array itself isn't.
This commit is contained in:
Jonathan Coates
2026-07-22 11:48:58 +01:00
parent e83fdd2d5d
commit db070d7737
2 changed files with 4 additions and 4 deletions
@@ -37,9 +37,9 @@ import org.jspecify.annotations.Nullable;
public class TurtlePlaceCommand implements TurtleCommand {
private final InteractDirection direction;
private final Object[] extraArguments;
private final @Nullable Object[] extraArguments;
public TurtlePlaceCommand(InteractDirection direction, Object[] arguments) {
public TurtlePlaceCommand(InteractDirection direction, @Nullable Object[] arguments) {
this.direction = direction;
extraArguments = arguments;
}
@@ -177,7 +177,7 @@ public class TurtlePlaceCommand implements TurtleCommand {
var placed = doDeployOnBlock(stack, turtlePlayer, hit, adjacent).consumesAction();
// Set text on signs
if (placed && item instanceof SignItem && extraArguments != null && extraArguments.length >= 1 && extraArguments[0] instanceof String message) {
if (placed && item instanceof SignItem && extraArguments.length >= 1 && extraArguments[0] instanceof String message) {
var world = turtle.getLevel();
var tile = world.getBlockEntity(position);
if (tile == null || tile == existingTile) {
@@ -73,7 +73,7 @@ public interface IArguments {
* @throws LuaException If an error occurred while fetching an argument.
* @see #get(int) To get a single argument.
*/
default Object[] getAll() throws LuaException {
default @Nullable Object[] getAll() throws LuaException {
var result = new Object[count()];
for (var i = 0; i < result.length; i++) result[i] = get(i);
return result;