mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 19:45:22 +09:00
Fixed Homes of same name being counted twise
This commit is contained in:
@@ -20,8 +20,8 @@ commands.add_command('home', 'Allows you to set, remove and goto your homes', {
|
||||
if command == 'set' then
|
||||
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
||||
if homes._n+1 > homes._m then player_return{'ExpGamingCommands-home.too-many-homes',homes._m} return commands.error end
|
||||
if not homes[name] then homes._n=homes._n+1 end
|
||||
homes[name] = pos
|
||||
homes._n=homes._n+1
|
||||
player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]}
|
||||
elseif command == 'remove' then
|
||||
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end
|
||||
|
||||
Reference in New Issue
Block a user