Skip to content

Commit 8158926

Browse files
authored
Check for attachments before attaching player to bed (#2862)
1 parent 4945f4b commit 8158926

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mods/beds/functions.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ local function lay_down(player, pos, bed_pos, state, skip)
102102
return false
103103
end
104104

105+
-- Check if player is attached to an object
106+
if player:get_attach() then
107+
return false
108+
end
109+
105110
if beds.player[name] then
106111
-- player already in bed, do nothing
107112
return false

0 commit comments

Comments
 (0)