Permissions
The Lootbags plugin uses the Hytale server's built-in command permission system. There are no custom permission nodes -- access control is determined by the command registration method.
How Permissions Work
The plugin registers two commands using different base classes, which determines their permission behavior:
| Base Class | Permission Behavior |
|---|---|
AbstractCommand with canGeneratePermission() = false | No permission required -- any player can use the command |
AbstractCommandCollection | Auto-generates a permission node based on the command name, restricting access to operators/admins |
Permission Table
Player Commands (No Permission Required)
| Command | Permission | Default | Description |
|---|---|---|---|
/kslootbags | None | All players | Show help message |
/kslootbags stats | None | All players | View personal lootbag statistics |
/kslootbags settings animation on|off | None | All players | Toggle reveal page animation |
| Right-click lootbag item | None | All players | Open a lootbag |
| Sneak + Right-click lootbag | None | All players | Place lootbag as decorative block |
Admin Commands (Operator Permission Required)
All admin commands are registered under AbstractCommandCollection, which auto-generates the kslootbagsadmin permission node. Only server operators can execute these commands.
| Command | Permission Node | Description |
|---|---|---|
/kslootbagsadmin | kslootbagsadmin | Show admin help |
/kslootbagsadmin panel | kslootbagsadmin | Open the admin panel UI |
/kslootbagsadmin give <id> [amount] | kslootbagsadmin | Give a lootbag to self |
/kslootbagsadmin edit <id> <prop> <val> | kslootbagsadmin | Edit a lootbag definition |
/kslootbagsadmin reload | kslootbagsadmin | Reload all configurations |
/kslootbagsadmin list | kslootbagsadmin | List all registered lootbags |
/kslootbagsadmin preview <id> | kslootbagsadmin | Preview lootbag contents |
/kslootbagsadmin lang <code> | kslootbagsadmin | Set language override |
Granting Admin Access
To grant a player access to admin commands, give them the kslootbagsadmin command permission through your Hytale server's permission system or operator configuration.
Unlike some mods that define granular permission nodes (e.g., ks.lootbags.admin.give, ks.lootbags.admin.edit), the Lootbags plugin uses a single auto-generated permission for all admin commands. If you need finer-grained access control, consider using a permission manager plugin that can restrict individual subcommands.
Interaction Permissions
The lootbag open interaction (lootbag_open) is registered as a custom interaction codec and does not require any permission. Any player holding a lootbag item can right-click to open it, subject to:
- The mod being enabled (
config.json->enabled: true) - The opening cooldown not being active (
openCooldownMs) - The player holding a valid, registered lootbag item
Integration Permissions
| Integration | Access Control |
|---|---|
| Core Admin Menu | Controlled by Core's ModMenuRegistry -- requires Core admin access |
| Showcase NPC | Registered via CoreAPI.registerNpcPageOpener("showcase_lootbag", ...) -- accessible to any player who interacts with the configured NPC |
| DynamicTooltips | No permission required -- tooltips are shown to all players automatically |