Template Commands

Commands for browsing, previewing, and applying permission templates to quickly set up your server with pre-configured groups, permissions, and tracks.

Command Summary

CommandDescription
/hp templateShow template help
/hp template helpShow template help
/hp template listList all templates (bundled + custom)
/hp template preview <name>Preview a template before applying
/hp template apply <name> [mode]Apply a template to the server
/hp template export <name>Export current setup as a custom template
/hp template reloadReload all templates from disk

Permissions

PermissionDescriptionDefault
hyperperms.command.templateAccess to all template commandsop
hyperperms.command.template.listList available templatesop
hyperperms.command.template.previewPreview template detailsop
hyperperms.command.template.applyApply a template to the serverop
hyperperms.command.template.exportExport current setup as a templateop
hyperperms.command.template.reloadReload templates from diskop

Listing Templates

/hp template list

List all available templates, including bundled templates and any custom templates you've created. Results are sorted alphabetically by name.

text
Usage: /hp template list

Output:
[HyperPerms] Available Templates (13):
[HyperPerms]   Bundled:
[HyperPerms]     - creative (Creative Server) by HyperPerms
[HyperPerms]     - factions (Factions Server) by HyperPerms
[HyperPerms]     - minigames (Minigames Server) by HyperPerms
[HyperPerms]     - prison (Prison Server) by HyperPerms
[HyperPerms]     - rpg (RPG Server) by HyperPerms
[HyperPerms]     - skyblock (Skyblock Server) by HyperPerms
[HyperPerms]     - smp (SMP Server) by HyperPerms
[HyperPerms]     - staff (Staff Hierarchy) by HyperPerms
[HyperPerms]     - survival (Survival Server) by HyperPerms
[HyperPerms]     - towny (Towny Server) by HyperPerms
[HyperPerms]     - vanilla (Vanilla Server) by HyperPerms
[HyperPerms]   Custom:
[HyperPerms]     - my-setup (My Custom Setup) by ServerAdmin

Previewing Templates

/hp template preview

Preview a template's contents before applying it. Shows groups, weights, permission counts, tracks, and what the apply result would look like.

text
Usage: /hp template preview <name>

Arguments:
  <name>  - Template name (e.g., survival, staff)

Example:
/hp template preview survival

Output:
[HyperPerms] Template: Survival Server
[HyperPerms] Description: A balanced setup for survival gameplay
[HyperPerms] Version: 1.0.0
[HyperPerms] Author: HyperPerms
[HyperPerms] Bundled: Yes
[HyperPerms]
[HyperPerms] Groups (5):
[HyperPerms]   - default (weight: 0, 12 permissions)
[HyperPerms]   - member (weight: 10, 8 permissions)
[HyperPerms]   - helper (weight: 30, 6 permissions)
[HyperPerms]   - mod (weight: 50, 10 permissions)
[HyperPerms]   - admin (weight: 100, 15 permissions)
[HyperPerms]
[HyperPerms] Tracks (1):
[HyperPerms]   - staff: helper β†’ mod β†’ admin
[HyperPerms]
[HyperPerms] Recommended Plugins: HyFactions, HyEconomy
[HyperPerms]
[HyperPerms] Apply Preview (merge mode):
[HyperPerms]   Groups created: 5
[HyperPerms]   Groups updated: 0
[HyperPerms]   Tracks created: 1
Always preview a template before applying to understand what changes will be made to your server.

Applying Templates

/hp template apply

Apply a template to your server. This creates groups, sets permissions, configures weights, and sets up tracks according to the template definition.

text
Usage: /hp template apply <name> [mode]

Arguments:
  <name>  - Template name
  [mode]  - Apply mode: merge (default) or replace

Examples:
/hp template apply survival
/hp template apply survival merge
/hp template apply staff replace

Output:
[HyperPerms] Applying template: Survival Server (merge mode)...
[HyperPerms] Template applied successfully!
[HyperPerms]   Groups created: 5
[HyperPerms]   Groups updated: 0
[HyperPerms]   Groups removed: 0
[HyperPerms]   Tracks created: 1
[HyperPerms]   Tracks updated: 0
[HyperPerms]   Backup saved: backup_20260222_143052

Apply Modes

There are two modes for applying templates:

Merge Mode (Default)

Merge mode adds new groups and updates existing ones without removing anything. This is the safest option and is used by default.

  • New groups from the template are created
  • Existing groups with the same name are updated (permissions added, weight set)
  • Groups not in the template are kept as-is
  • Tracks are created or updated without removing existing ones
text
# Merge keeps your existing setup and adds template data on top
/hp template apply survival merge

# Equivalent (merge is the default)
/hp template apply survival
Merge mode is ideal when you want to add a template's groups alongside your existing configuration.

Replace Mode

Replace mode overwrites your entire permission setup with the template. All existing groups, permissions, and tracks are removed and replaced.

  • All existing groups are removed
  • All existing tracks are removed
  • Template groups and tracks are created fresh
  • A backup is automatically created before replacing
text
/hp template apply survival replace

[HyperPerms] WARNING: Replace mode will remove all existing groups and tracks!
[HyperPerms] A backup will be created before applying.
[HyperPerms] Applying template: Survival Server (replace mode)...
[HyperPerms] Template applied successfully!
[HyperPerms]   Groups created: 5
[HyperPerms]   Groups updated: 0
[HyperPerms]   Groups removed: 3
[HyperPerms]   Tracks created: 1
[HyperPerms]   Tracks updated: 0
[HyperPerms]   Backup saved: backup_20260222_143052
Replace mode removes all existing groups, permissions, and tracks. A backup is created automatically, but use this mode with caution. It is best suited for fresh server setups.

Exporting Templates

/hp template export

Export your current server setup as a custom template. This saves all groups, permissions, weights, and tracks to a template file that can be reused or shared.

text
Usage: /hp template export <name>

Arguments:
  <name>  - Name for the exported template (lowercase, no spaces)

Example:
/hp template export my-setup

Output:
[HyperPerms] Exporting current setup as template: my-setup
[HyperPerms] Template exported successfully!
[HyperPerms]   Groups: 6
[HyperPerms]   Tracks: 2
[HyperPerms]   Saved to: templates/my-setup.json
Export your setup before making major changes. You can always re-apply the exported template to restore your previous configuration.

Reloading Templates

/hp template reload

Reload all templates from disk. Use this after manually adding or modifying template files.

text
Usage: /hp template reload

Output:
[HyperPerms] Reloading templates...
[HyperPerms] Loaded 11 bundled templates and 2 custom templates.

Bundled Templates

HyperPerms ships with 11 bundled templates designed for common server types. These templates provide a solid starting point that you can customize after applying.

TemplateDescription
vanillaMinimal setup for vanilla-style servers
survivalBalanced groups for survival gameplay
creativeCreative server with build permissions
smpSMP server with community features
factionsFactions server with faction-related permissions
skyblockSkyblock server with island permissions
prisonPrison server with mine and rank permissions
minigamesMinigames server with game management
rpgRPG server with class and quest permissions
townyTowny server with town management
staffStaff hierarchy template (helper, mod, admin, owner)

Custom Templates

Custom templates are stored in the templates/ directory inside your HyperPerms data folder. Each template is a JSON file with the following structure:

json
{
  "name": "my-setup",
  "displayName": "My Custom Setup",
  "description": "A custom template for my server",
  "version": "1.0.0",
  "author": "ServerAdmin",
  "groups": {
    "default": {
      "weight": 0,
      "permissions": [
        { "node": "server.chat", "value": true },
        { "node": "server.help", "value": true }
      ]
    },
    "vip": {
      "weight": 20,
      "permissions": [
        { "node": "server.fly", "value": true },
        { "node": "server.kit.vip", "value": true }
      ]
    }
  },
  "tracks": {
    "donor": ["vip", "vip-plus", "mvp"]
  },
  "metadata": {
    "recommendedPlugins": ["HyEconomy"]
  }
}

You can create custom templates in two ways:

  1. Use /hp template export to export your current setup
  2. Manually create a JSON file in the templates/ directory
After manually adding template files, run /hp template reload to make them available.

Complete Examples

Setting Up a New Survival Server

text
# Preview the survival template
/hp template preview survival

# Apply it (merge mode, since it's a fresh server)
/hp template apply survival

# Customize: add a VIP group on top of the template
/hp group create vip
/hp group setweight vip 20
/hp group addperm vip server.fly true
/hp group addperm vip server.kit.vip true

Combining Multiple Templates

text
# Start with a survival template
/hp template apply survival

# Merge staff template on top
/hp template apply staff merge

# Both sets of groups now exist side by side

Migrating Between Server Types

text
# First, export your current setup as a backup
/hp template export old-setup

# Replace with the new server type
/hp template apply prison replace

# If something goes wrong, restore from backup
/hp template apply old-setup replace

Sharing Templates Between Servers

text
# On Server A: export your setup
/hp template export network-perms

# Copy the file templates/network-perms.json to Server B

# On Server B: reload and apply
/hp template reload
/hp template apply network-perms

Template Properties

Each template contains the following properties:

  • name - Internal identifier (lowercase, no spaces)
  • displayName - Human-readable name shown in listings
  • description - Brief description of what the template provides
  • version - Template version (semver format)
  • author - Template author name
  • isBundled - Whether the template is bundled with HyperPerms (read-only)
  • groups - Map of group name to group definition (weight, permissions)
  • tracks - Map of track name to ordered list of group names
  • metadata.recommendedPlugins - List of plugins that work well with this template

See Also