servertap icon indicating copy to clipboard operation
servertap copied to clipboard

/v1/server/whitelist says whitelist disabled when it is not.

Open MattHardwick34 opened this issue 8 months ago • 4 comments

Whenever I try to view the whitelist I get the response "error: The server has whitelist disabled" - this is across different paper versions. The /v1/server endpoint does not list the entire whitelist so I have a few broken integrations.

MattHardwick34 avatar Apr 07 '25 19:04 MattHardwick34

What version of Paper are you on? Just tested on latest 1.21.4 (244) and the plugin works as intended.

GET /v1/server/whitelist -> [] (Whitelist enabled) GET /v1/server/whitelist -> "error: The server has whitelist disabled" (Whitelist disabled)

c1oneman avatar Apr 08 '25 01:04 c1oneman

1.21.4 #222 (224 only just came out will try that later) The only plugin I have that does whitelist related stuff is floodgate could that be affecting it?

MattHardwick34 avatar Apr 08 '25 07:04 MattHardwick34

Hi - /v1/server/whitelist still failing even on that same Paper build. /v1/server shows the whitelist correctly when it's short enough.

the ONLY plugin I have is ServerTap 0.6.1 running on #224 of Paper 1.21.4

Java on local test rig is jdk 23, on live is 21.

MattHardwick34 avatar Apr 09 '25 21:04 MattHardwick34

I believe the issue is in the ServerApi.java file where the /v1/server/whitelist endpoint checks if whitelist is enabled using bukkitServer.hasWhitelist() before returning the whitelist data. However, the /v1/server endpoint includes whitelist information without performing this check, which is why you're seeing the whitelist data in the server response but not in the dedicated whitelist endpoint.

CaptainParis avatar May 21 '25 10:05 CaptainParis