Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add individual permission check for /settings options #250

Open
thomasmny opened this issue Feb 13, 2024 · 2 comments
Open

Add individual permission check for /settings options #250

thomasmny opened this issue Feb 13, 2024 · 2 comments

Comments

@thomasmny
Copy link
Owner

What problem does this feature solve?

Allows admins to block certain settings from being toggled

@nicokempe
Copy link
Contributor

nicokempe commented Jun 22, 2024

Do you mean something like this for the SettingsInventory at the InventoryClickEvent?

case 13:
    if (!player.hasPermission("buildsystem.settings.disableinteract")) {
        player.sendMessage(ChatColor.RED + "You do not have permission to toggle this setting.");
        return;
    }
    settings.setDisableInteract(!settings.isDisableInteract());
    break;

@thomasmny
Copy link
Owner Author

yes, but I'd also like to display whether or not a player is even allowed to modify the setting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants