mirror of
https://github.com/mt-mods/dreambuilder_hotbar.git
synced 2025-01-13 14:57:28 +01:00
fix global warning
This commit is contained in:
parent
6c93b3800e
commit
0e37dc7009
2
init.lua
2
init.lua
@ -51,7 +51,7 @@ minetest.register_chatcommand("hotbar", {
|
|||||||
params = "[size]",
|
params = "[size]",
|
||||||
description = "Sets the size of your hotbar",
|
description = "Sets the size of your hotbar",
|
||||||
func = function(name, slots)
|
func = function(name, slots)
|
||||||
hotbar_size = validate_size(tonumber(slots))
|
local hotbar_size = validate_size(tonumber(slots))
|
||||||
player_hotbar_settings[name] = hotbar_size
|
player_hotbar_settings[name] = hotbar_size
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
player:hud_set_hotbar_itemcount(hotbar_size)
|
player:hud_set_hotbar_itemcount(hotbar_size)
|
||||||
|
Loading…
Reference in New Issue
Block a user