Wiki 9Minecraft Wiki 9Minecraft

Run Automatic Commands When Selecting a Class

Java EditionModGuides 4FAQ 10Related mods 48
DownloadClass Enhancement Mod

Get the files on 9Minecraft

Contents (4)
  1. Understand Command Execution
  2. Add Commands to Your Class
  3. Common Use Cases
  4. Test Your Commands

Understand Command Execution

The Class Enhancement Mod automatically runs commands from your class configuration the moment a player selects that class. Commands execute without requiring manual input.

Add Commands to Your Class

In class_enhancement.toml, locate your custom class and find the commands list. Add commands without the leading / symbol. Use %player% as a placeholder for the player's name:

`

commands = [

"tp %player% 100 64 200",

"effect give %player% minecraft:speed infinite 1 false",

"scale set %player% 1.5"

]

`

Common Use Cases

  • Teleport: Send players to a spawn location
  • Team Assignment: Add players to teams automatically
  • Size Changes: Modify player scale (requires Pehkui mod)
  • Potion Effects: Grant permanent buffs or debuffs

Test Your Commands

Save the file, restart, and select your class. Watch the chat or action bar for command feedback. Verify the intended effect occurs.

More guides for this mod