Skip to main content

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 ClassPermission Behavior
AbstractCommand with canGeneratePermission() = falseNo permission required -- any player can use the command
AbstractCommandCollectionAuto-generates a permission node based on the command name, restricting access to operators/admins

Permission Table

Player Commands (No Permission Required)

CommandPermissionDefaultDescription
/kslootbagsNoneAll playersShow help message
/kslootbags statsNoneAll playersView personal lootbag statistics
/kslootbags settings animation on|offNoneAll playersToggle reveal page animation
Right-click lootbag itemNoneAll playersOpen a lootbag
Sneak + Right-click lootbagNoneAll playersPlace 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.

CommandPermission NodeDescription
/kslootbagsadminkslootbagsadminShow admin help
/kslootbagsadmin panelkslootbagsadminOpen the admin panel UI
/kslootbagsadmin give <id> [amount]kslootbagsadminGive a lootbag to self
/kslootbagsadmin edit <id> <prop> <val>kslootbagsadminEdit a lootbag definition
/kslootbagsadmin reloadkslootbagsadminReload all configurations
/kslootbagsadmin listkslootbagsadminList all registered lootbags
/kslootbagsadmin preview <id>kslootbagsadminPreview lootbag contents
/kslootbagsadmin lang <code>kslootbagsadminSet 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.

No Custom Permission Nodes

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

IntegrationAccess Control
Core Admin MenuControlled by Core's ModMenuRegistry -- requires Core admin access
Showcase NPCRegistered via CoreAPI.registerNpcPageOpener("showcase_lootbag", ...) -- accessible to any player who interacts with the configured NPC
DynamicTooltipsNo permission required -- tooltips are shown to all players automatically