mojira.dev
MC-301929

/deop will disconnect non-whitelisted operators

Executing /deop will disconnect non-whitelisted operators, as the /deop command calls kickNonWhitelistedPlayers (yarn mappings, not mojmap, linkie didn’t work sorry), which calls whitelist.isAllowed and not PlayerManager.isWhitelisted, without calling any form of isOperator.

Reproduction steps:

  1. Launch a dedicated minecraft server.

  2. Join with two players and /op them both.

  3. Enable enforce-whitelist and white-list in server.properties and restart the server.

  4. Join with the same two players.

  5. Execute /deop Player1 from Player2.

  6. Player2 will be kicked as well, but can rejoin (would expect them to stay).

(side-note: PlayerManager calls whitelist.contains, DedicatedPlayerManager calls whitelist.isAllowed which simply refers back to whitelist.contains, so that’s a thing; And I don’t know if my mod dev env is bugged or if it’s intentional or what, but just fyi BannedPlayerList.contains seems to call itself infinitely)

Comments 3

Reproduced on vanilla 1.21.8 as well.

BannedPlayerList.contains seems to call itself infinitely

Won’t that just result in a StackOverflowError?

@Wolfieboy09 yes, this is not accurate in the real code of the game, just a mappings mistake paired with an IDE bug.

Laxystem

(Unassigned)

Unconfirmed

(Unassigned)

1.21.8

Retrieved