mirror of
https://github.com/mt-mods/dreambuilder_hotbar.git
synced 2024-11-19 21:23:45 +01:00
make sure validate always returns a useful number
e.g. /hotbar 999 --> return 16
This commit is contained in:
parent
0e37dc7009
commit
5a7267afa7
2
init.lua
2
init.lua
@ -6,6 +6,8 @@ local function validate_size(s)
|
||||
if (size == 8 or size == 16 or size == 23 or size == 24 or size == 32)
|
||||
and size <= maxslots then
|
||||
return size
|
||||
else
|
||||
return 16
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user