mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Removed player config level and useing error command
This commit is contained in:
@@ -2,7 +2,5 @@
|
|||||||
-- @config Preset-Player-Quickbar
|
-- @config Preset-Player-Quickbar
|
||||||
|
|
||||||
return {
|
return {
|
||||||
players={ --- @setting players list of all players and their quickbar items
|
dangerarea={'transport-belt','fast-transport-belt'}
|
||||||
dangerarea={'transport-belt','fast-transport-belt'}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ require 'config.expcore.command_general_parse'
|
|||||||
-- @command load-quickbar
|
-- @command load-quickbar
|
||||||
Commands.new_command('load-quickbar','Loads your preset Quickbar items')
|
Commands.new_command('load-quickbar','Loads your preset Quickbar items')
|
||||||
:register(function(player)
|
:register(function(player)
|
||||||
if config.players[player.name] then
|
if config[player.name] then
|
||||||
local custom_quickbar = config.players[player.name]
|
local custom_quickbar = config[player.name]
|
||||||
for i, item_name in ipairs(custom_quickbar) do
|
for i, item_name in ipairs(custom_quickbar) do
|
||||||
player.set_quick_bar_slot(i, item_name)
|
player.set_quick_bar_slot(i, item_name)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Commands.print('Quickbar preset not found','red')
|
Commands.error('Quickbar preset not found')
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user