Skip to content

PlaceholderAPI JavaScript cannot retrieve player main Residence (Residence API?) #1398

@chenruibill

Description

@chenruibill

I am using PlaceholderAPI's JavaScript expansion to access the Residence plugin API and retrieve a player's main residence.

The JavaScript code itself runs correctly, and there are no syntax errors. However, when calling the Residence API, the script fails to correctly obtain the player's main residence, even though the player clearly owns at least one residence in-game.

Environment

Server: Spigot / Paper

PlaceholderAPI

Residence

JavaScript expansion (Nashorn / GraalJS)

residence1.js

Expected Behavior

%main_res% should return the player’s main residence name

%main_owner% should return the residence owner

Actual Behavior

Both placeholders return an empty value (no text output at all)

No errors are printed to console

The player does own residences, and Residence commands (e.g. /res info) work correctly in-game

When called from PlaceholderAPI JavaScript,
getResidenceList(playerName, true, false) appears to return null or an empty list

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions