Skip to content

API-accessible way to allow using the gamemode switcher for non-ops #13489

@Warriorrrr

Description

@Warriorrrr

Is your feature request related to a problem?

In previous versions it was possible to allow non-ops such as server moderators to use the gamemode switcher by using the sendOpLevel API, but since the 1.21.6 update the gamemode switcher now has its own packet with a server side permission level check, making this approach no longer possible.

Describe the solution you'd like.

I'm proposing adding a new event that's fired when a ServerboundChangeGameModePacket is received by the server, allowing plugins to override vanilla's permission check with their own.

Describe alternatives you've considered.

Adding a minecraft.command.gamemode permission check, but ideally I'd like it to be more granular and be able to implement a per-gamemode permission to allow access to survival & spectator but not creative.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions