Permissions
Control who can access and manage Loot Containers configuration. Permission settings are available through the in-game configuration screen.
Overview
Loot Containers includes several permission settings designed to control access to configuration management. These include operator requirements, an optional player allowlist, and an operator bypass option.
The configuration screen currently provides controls for all these settings. However, only the server-side operator permission check is currently enforced. The configurable allowlist and permission toggles have not yet been connected to the server's authorization system.
Players must have Minecraft operator permission level 2 or higher to receive configuration data and save configuration changes. This requirement is currently enforced regardless of the permission toggle settings.
Permission Settings
The Permissions section of the in-game configuration screen contains three toggle options and an allowlist management section.
Require OP
Determines whether operator status should be required for configuration access when the allowlist is disabled.
- ON: Intended to require operator permissions.
- OFF: Intended to remove that operator requirement.
Current implementation: The server always checks for operator permission level 2 or higher. Changing this setting does not currently change that requirement.
Allowlist
Enables the allowlist option, which is designed to restrict configuration access to specific players.
- ON: Intended to enable allowlist-based access.
- OFF: Disables the allowlist option.
Current implementation: The configuration screen supports adding and removing player UUIDs, but the server does not currently check the allowlist when authorizing configuration requests.
OP Bypass
Configures whether operators should be able to bypass allowlist restrictions.
- ON: Intended to allow operators to bypass the allowlist.
- OFF: Intended to prevent that bypass.
Current implementation: This setting is not currently connected to the server's authorization checks.
Allowlist Management
The configuration screen provides tools for managing the list of permitted player UUIDs.
Adding a Player
- Open the Permissions section.
- Enter the player's Minecraft UUID in the Player UUID field.
- Select Add UUID.
UUID entries must use a valid UUID format. The input field accepts up to 36 characters, and invalid UUIDs are rejected. Duplicate entries are also prevented.
Removing a Player
- Enter the UUID of the player you want to remove.
- Select Remove UUID.
UUID removal uses case-insensitive matching. The screen displays shortened UUID entries, showing up to five players at a time. If additional players exist, the interface displays how many more entries are in the list.
Adding a UUID stores it in the configuration, but it does not currently grant or deny access to the configuration editor. The server still uses its operator permission level 2 check.
Default Values
The following values are initialized when LootSettings is created.
| Setting | Default | Description |
|---|---|---|
| Require OP | true | Operator requirement toggle. |
| Allowlist Enabled | false | Allowlist toggle. |
| OP Bypass | true | Operator bypass toggle. |
| Allowed Players | Empty | List of stored player UUIDs. |
Current Server Authorization
Configuration access is checked by the server when a player requests configuration synchronization or submits configuration changes.
Opening the Configuration Editor
- The client requests configuration synchronization from the server.
- The server checks whether the player has operator permission level 2 or higher.
- If authorized, the server sends permission approval and configuration data to that player.
- The client opens the editor after receiving the configuration data and confirming its local permission state.
Saving Configuration
When a player submits configuration changes, the server performs another operator permission check. Players who do not meet the requirement have their save requests rejected.
Authorized configuration changes are validated before being saved. If a save fails, the server attempts to restore the previous configuration and reports the result to the player.
if (player == null || !player.hasPermissions(2)) {
return;
}This check is used for both configuration synchronization and configuration saving.
Resetting Permissions
The Permissions section includes reset behavior that restores the following values:
- Require OP: ON
- Allowlist: OFF
- OP Bypass: ON
- Allowed Players: Empty
Resetting these values restores the configuration settings, but does not change the current server-side authorization behavior.
Frequently Asked Questions
Can non-operators currently open the configuration editor?
No. The server requires operator permission level 2 or higher before sending configuration data.
Does enabling the allowlist restrict access?
Not currently. The interface supports managing UUIDs, but the server does not yet use the allowlist to authorize players.
Does disabling Require OP remove the operator requirement?
No. The server currently enforces the operator permission level 2 check independently of this setting.
Can operators bypass the allowlist?
The OP Bypass setting is available in the configuration screen, but its behavior has not yet been implemented in server-side authorization.
Where are permission settings saved?
Permission settings are part of LootSettings and are saved through the mod's general configuration manager.
