Registers the /SetClass command (aliases /CharSetClass, /ChangeClass), which moves the caller, or for operators another player, into a class when the class limit and the PlayerCanChangeClass hook allow it.

Summary

Methods

Moves a player into a class.

Methods

COMMAND:OnRun(player, arguments)

shared gamemodes/catwork/gamemode/core/commands/sh_setclass.lua:18

Moves a player into a class.

With one argument, the class name or ID, the caller changes their own class, which they need access to (see cw.core:HasObjectAccess); the classes menu uses this form. With two arguments, a player name and the class, an operator, or a player given access to this command, sets that player's class. Respects the class limit unless PlayerCanBypassClassLimit allows it, and runs PlayerCanChangeClass.

Parameters

  • player
  • arguments

Defined in