I want to know if the player is located inside his safe house, but I'm not sure how to get that information. My first try was using functions like
local player = getPlayer()
SafeHouse.isSafeHouse(player:getCurrentSquare(), player:getUsername(), true)
but checking the Javadoc it seems that the function SafeHouse.isSafeHouse() will return a SafeHouse object only if the player is in a safe house but he does not belong to it, returning nil otherwise.
How can I get this info?