Skip to content

Commit

Permalink
Check for attachments before attaching player to bed (#2862)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElCeejo committed May 8, 2021
1 parent 4945f4b commit 8158926
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mods/beds/functions.lua
Expand Up @@ -102,6 +102,11 @@ local function lay_down(player, pos, bed_pos, state, skip)
return false
end

-- Check if player is attached to an object
if player:get_attach() then
return false
end

if beds.player[name] then
-- player already in bed, do nothing
return false
Expand Down

0 comments on commit 8158926

Please sign in to comment.