diff --git a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java index 669b532b0..e3e98fbe4 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java @@ -150,7 +150,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 1) { - if (!(arguments[1] instanceof Double) && !(arguments[1] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[1] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -160,7 +160,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[1] instanceof Double) && !(arguments[2] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[2] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -200,7 +200,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 1) { - if (!(arguments[1] instanceof Double) && !(arguments[1] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[1] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -211,7 +211,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[2] instanceof Double) && !(arguments[2] == null)) // Arg wrong type + if (!(arguments[2] instanceof Double) && arguments[2] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); }