diff --git a/config/preset_player_quickbar.lua b/config/preset_player_quickbar.lua index 9764291b..079ccd87 100644 --- a/config/preset_player_quickbar.lua +++ b/config/preset_player_quickbar.lua @@ -2,7 +2,5 @@ -- @config Preset-Player-Quickbar return { - players={ --- @setting players list of all players and their quickbar items - dangerarea={'transport-belt','fast-transport-belt'} - } + dangerarea={'transport-belt','fast-transport-belt'} } diff --git a/modules/commands/quickbar.lua b/modules/commands/quickbar.lua index 72886cbf..dae64e24 100644 --- a/modules/commands/quickbar.lua +++ b/modules/commands/quickbar.lua @@ -14,12 +14,12 @@ require 'config.expcore.command_general_parse' -- @command load-quickbar Commands.new_command('load-quickbar','Loads your preset Quickbar items') :register(function(player) - if config.players[player.name] then - local custom_quickbar = config.players[player.name] + if config[player.name] then + local custom_quickbar = config[player.name] for i, item_name in ipairs(custom_quickbar) do player.set_quick_bar_slot(i, item_name) end else - Commands.print('Quickbar preset not found','red') + Commands.error('Quickbar preset not found') end end)