mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-13 02:40:28 +00:00
Replaced "no value" with "nil" in ArgumentHelper
This commit is contained in:
parent
1d63598d43
commit
6fdf38f55f
@ -57,7 +57,7 @@ public final class ArgumentHelper
|
|||||||
|
|
||||||
public static double getNumber( @Nonnull Object[] args, int index ) throws LuaException
|
public static double getNumber( @Nonnull Object[] args, int index ) throws LuaException
|
||||||
{
|
{
|
||||||
if( index >= args.length ) throw badArgument( index, "number", "no value" );
|
if( index >= args.length ) throw badArgument( index, "number", "nil" );
|
||||||
Object value = args[ index ];
|
Object value = args[ index ];
|
||||||
if( value instanceof Number )
|
if( value instanceof Number )
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ public final class ArgumentHelper
|
|||||||
|
|
||||||
public static int getInt( @Nonnull Object[] args, int index ) throws LuaException
|
public static int getInt( @Nonnull Object[] args, int index ) throws LuaException
|
||||||
{
|
{
|
||||||
if( index >= args.length ) throw badArgument( index, "number", "no value" );
|
if( index >= args.length ) throw badArgument( index, "number", "nil" );
|
||||||
Object value = args[ index ];
|
Object value = args[ index ];
|
||||||
if( value instanceof Number )
|
if( value instanceof Number )
|
||||||
{
|
{
|
||||||
@ -90,7 +90,7 @@ public final class ArgumentHelper
|
|||||||
|
|
||||||
public static boolean getBoolean( @Nonnull Object[] args, int index ) throws LuaException
|
public static boolean getBoolean( @Nonnull Object[] args, int index ) throws LuaException
|
||||||
{
|
{
|
||||||
if( index >= args.length ) throw badArgument( index, "boolean", "no value" );
|
if( index >= args.length ) throw badArgument( index, "boolean", "nil" );
|
||||||
Object value = args[ index ];
|
Object value = args[ index ];
|
||||||
if( value instanceof Boolean )
|
if( value instanceof Boolean )
|
||||||
{
|
{
|
||||||
@ -105,7 +105,7 @@ public final class ArgumentHelper
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public static String getString( @Nonnull Object[] args, int index ) throws LuaException
|
public static String getString( @Nonnull Object[] args, int index ) throws LuaException
|
||||||
{
|
{
|
||||||
if( index >= args.length ) throw badArgument( index, "string", "no value" );
|
if( index >= args.length ) throw badArgument( index, "string", "nil" );
|
||||||
Object value = args[ index ];
|
Object value = args[ index ];
|
||||||
if( value instanceof String )
|
if( value instanceof String )
|
||||||
{
|
{
|
||||||
@ -121,7 +121,7 @@ public final class ArgumentHelper
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public static Map<Object, Object> getTable( @Nonnull Object[] args, int index ) throws LuaException
|
public static Map<Object, Object> getTable( @Nonnull Object[] args, int index ) throws LuaException
|
||||||
{
|
{
|
||||||
if( index >= args.length ) throw badArgument( index, "table", "no value" );
|
if( index >= args.length ) throw badArgument( index, "table", "nil" );
|
||||||
Object value = args[ index ];
|
Object value = args[ index ];
|
||||||
if( value instanceof Map )
|
if( value instanceof Map )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user