Skip to main content

Permissions

The Season Pass uses a minimal permission model. Player commands have no permission requirements, while all admin functionality is gated behind a single permission node.

Permission Nodes

PermissionDefaultDescription
seasonpass.adminOP onlyGrants access to all admin commands and the admin panel

Player Commands

All player commands are available to every player without any permission check. The canGeneratePermission() method returns false for the entire player command collection.

CommandPermission Required
/sp openNone
/sp infoNone
/sp buyNone

Admin Commands

Every admin subcommand requires seasonpass.admin. The permission is checked via player.hasPermission("seasonpass.admin") at the start of each command handler. Console senders bypass the permission check.

CommandPermission
/spadmin panelseasonpass.admin
/spadmin start <seasonId>seasonpass.admin
/spadmin endseasonpass.admin
/spadmin pauseseasonpass.admin
/spadmin resumeseasonpass.admin
/spadmin reloadseasonpass.admin
/spadmin infoseasonpass.admin
/spadmin grantxp <player> <amount>seasonpass.admin
/spadmin setxp <player> <amount>seasonpass.admin
/spadmin granttokens <player> <amount>seasonpass.admin
/spadmin grantpremium <player>seasonpass.admin
/spadmin revokepremium <player>seasonpass.admin
/spadmin settier <player> <tier>seasonpass.admin
/spadmin resetplayer <player>seasonpass.admin
/spadmin grantbooster <player> <multiplier> <minutes>seasonpass.admin
/spadmin doublexp <minutes> [multiplier]seasonpass.admin
/spadmin stopdoublexpseasonpass.admin
/spadmin setprestige <player> <level>seasonpass.admin

Admin Panel

The admin panel (/spadmin panel) performs its own permission check independently from the subcommand system. It calls player.hasPermission("seasonpass.admin") directly before opening the page. All actions within the admin panel UI (saving settings, managing players, editing content) inherit this same permission gate.

Showcase Compatibility

In addition to the seasonpass.admin permission, admin commands and the admin panel also check for Showcase mode via ShowcaseCompat.isShowcaseBlocked(playerRef). When running on a showcase/demo server, write operations (starting/ending seasons, modifying player data, saving config changes) are blocked even for admin users. This prevents accidental modifications on display servers.

The Showcase check applies to the following actions:

  • All season lifecycle commands (start, end, pause, resume)
  • All player management commands (grantxp, setxp, granttokens, grantpremium, revokepremium, settier, resetplayer, grantbooster, setprestige)
  • Global event commands (doublexp, stopdoublexp)
  • Config reload (reload)
  • All save operations in the admin panel

Console Access

All admin commands can be executed from the server console without any permission check. The checkAdmin() method returns true immediately when ctx.isPlayer() is false.

Single Permission Design

The Season Pass intentionally uses a single admin permission node rather than granular per-command permissions. This simplifies server administration -- grant seasonpass.admin to trusted staff and they have full control over the season pass system.