Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Types

Supporting types returned by the Omegga and Player APIs.

IServerStatus

PropertyTypeDescription
serverNamestring
descriptionstring
bricksnumber
componentsnumber
timenumber
maxPlayers?numberplayer slots, from the status’ Players (online/max): line
stats?Record<string, number>every integer-valued line in the status header, keyed by a snake_cased version of its label (bricks, components, …). Reported generically so stats the game adds later are available without a parser change.
players{ name: string; ping: number; time: number; roles: string[]; address: string; id: string; }[]

Declared in src/omegga/types.ts.

IGamemode

The single gamemode that replaced minigames (~CL14000). Owns the teams and the players within them.

PropertyTypeDescription
namestringthe gamemode name (e.g. “Sandbox”)
gamestatestringthe BP_GameStateBase_C object id
membersOmeggaPlayer[]every player across all teams
teams{ name: string; team: string; color: number[]; members: OmeggaPlayer[]; }[]

Declared in src/omegga/types.ts.

ILogMinigame

PropertyTypeDescription
namestring
rulesetstring
indexnumber
membersOmeggaPlayer[]
teams{ name: string; team: string; color: number[]; members: OmeggaPlayer[]; }[]

Declared in src/omegga/types.ts.

IMinigameList

An array of:

PropertyTypeDescription
indexnumber
namestring
numMembersnumber
owner{ name: string; id: string; }

Declared in src/omegga/types.ts.

IPlayerPositions

An array of:

PropertyTypeDescription
playerOmeggaPlayer
pawnstring | nullnull when the player has no pawn (e.g. spectating)
posnumber[] | nullnull when the player has no pawn position
isDeadboolean

Declared in src/omegga/types.ts.

BrickBounds

PropertyTypeDescription
minBound[number, number, number]
maxBound[number, number, number]
center[number, number, number]

Declared in src/plugin.ts.

BrickInteraction

Created when a player clicks on a brick with an interact component

PropertyTypeDescription
brick_namestringBrick name from catalog (Turkey Body, 4x Cube)
brick_assetstring | nullBrick asset name; null when the display name is not recognized
brick_size[number, number, number] | nullBrick size; null when the display name is not recognized
player{ id: string; name: string; controller: string; pawn: string }Player information, id, name, controller, and pawn
position[number, number, number]Brick center position
messagestringmessage sent from a brick click interaction
datanull | number | string | boolean | Record<string, unknown>data parsed from the line (if it starts with json:)
jsonbooleanTrue when there was a json payload
errorbooleanTrue when there was a parse error

Declared in src/plugin.ts.

AutoRestartConfig

AutoRestart options

PropertyTypeDescription
playersboolean
announcementboolean
saveWorldboolean

Declared in src/plugin.ts.

WeaponClass

type WeaponClass = | 'Weapon_APCarbine'
  | 'Weapon_AntiMaterielRifle'
  | 'Weapon_ArmingSword'
  | 'Weapon_AssaultRifle'
  | 'Weapon_AutoShotgun'
  | 'Weapon_Battleaxe'
  | 'Weapon_Bazooka'
  | 'Weapon_BoltActionRifle'
  | 'Weapon_Bow'
  | 'Weapon_BoxPistol'
  | 'Weapon_BullpupRifle'
  | 'Weapon_BullpupSMG'
  | 'Weapon_ChargedLongsword'
  | 'Weapon_CrystalKalis'
  | 'Weapon_Derringer'
  | 'Weapon_Dynamite'
  | 'Weapon_FlintlockPistol'
  | 'Weapon_GrenadeLauncher'
  | 'Weapon_GuardPistol'
  | 'Weapon_Handaxe'
  | 'Weapon_HealthPotion'
  | 'Weapon_HeavyAssaultRifle'
  | 'Weapon_HeavySMG'
  | 'Weapon_HeroSword'
  | 'Weapon_HighPowerPistol'
  | 'Weapon_HoloBlade'
  | 'Weapon_HuntingShotgun'
  | 'Weapon_Ikakalaka'
  | 'Weapon_ImpactGrenade'
  | 'Weapon_ImpactGrenadeLauncher'
  | 'Weapon_ImpulseGrenade'
  | 'Weapon_Khopesh'
  | 'Weapon_Knife'
  | 'Weapon_LeverActionRifle'
  | 'Weapon_LightMachineGun'
  | 'Weapon_LongSword'
  | 'Weapon_MagnumPistol'
  | 'Weapon_MicroSMG'
  | 'Weapon_Minigun'
  | 'Weapon_Minigun'
  | 'Weapon_MissileLauncher'
  | 'Weapon_PDW'
  | 'Weapon_Pickaxe'
  | 'Weapon_PipeBomb'
  | 'Weapon_Pistol'
  | 'Weapon_PlasmaPistol'
  | 'Weapon_PlasmaSMG'
  | 'Weapon_PulseCarbine'
  | 'Weapon_PulseRifle'
  | 'Weapon_QuadLauncher'
  | 'Weapon_Revolver'
  | 'Weapon_RocketJumper'
  | 'Weapon_RocketLauncher'
  | 'Weapon_Sabre'
  | 'Weapon_SemiAutoRifle'
  | 'Weapon_ServiceRifle'
  | 'Weapon_Shotgun'
  | 'Weapon_SlugShotgun'
  | 'Weapon_Sniper'
  | 'Weapon_SodaCan'
  | 'Weapon_Spatha'
  | 'Weapon_SportingShotgun'
  | 'Weapon_StampedSMG'
  | 'Weapon_StandardSubmachineGun'
  | 'Weapon_StickGrenade'
  | 'Weapon_SubmachineGun'
  | 'Weapon_SuperShotgun'
  | 'Weapon_SuppressedAssaultRifle'
  | 'Weapon_SuppressedBullpupSMG'
  | 'Weapon_SuppressedGuardPistol'
  | 'Weapon_SuppressedHeavySMG'
  | 'Weapon_SuppressedMicroSMG'
  | 'Weapon_SuppressedPistol'
  | 'Weapon_SuppressedServiceRifle'
  | 'Weapon_TacticalSMG'
  | 'Weapon_TacticalShotgun'
  | 'Weapon_Tomahawk'
  | 'Weapon_TwinCannon'
  | 'Weapon_TypewriterSMG'
  | 'Weapon_Zweihander'

Declared in src/plugin.ts.

IPluginConfigDefinition

type IPluginConfigDefinition = {
  description: string;
} & (
  | {
      type: 'string' | 'password' | 'role';
      default: string;
    }
  | {
      type: 'boolean';
      default: boolean;
    }
  | {
      type: 'number';
      default: number;
    }
  | {
      type: 'enum';
      options: (string | number)[];
      default: string | number;
    }
  | {
      type: 'players';
      default: {
        id: string;
        name: string;
      };
    }
  | ({
      type: 'list';
    } & (
      | {
          itemType: 'string';
          default: string[];
        }
      | {
          itemType: 'number';
          default: number[];
        }
      | {
          itemType: 'enum';
          options: (string | number)[];
          default: string | number;
        }
    ))
)

Declared in src/plugin.ts.

IPluginCommand

PropertyTypeDescription
namestring
descriptionstring
example?string
argsIPluginCommandArgument[]

Declared in src/plugin.ts.

IPluginCommandArgument

PropertyTypeDescription
namestring
descriptionstring
required?boolean

Declared in src/plugin.ts.

IPluginDocumentation

PropertyTypeDescription
namestring
descriptionstring
authorstring
configRecord<string, IPluginConfigDefinition>
commandsIPluginCommand[]

Declared in src/plugin.ts.

IMatcher

type IMatcher<T> = | {
      pattern: RegExp;
      callback: (match: RegExpMatchArray) => boolean;
    }
  | {
      pattern: (line: string, match: RegExpMatchArray | null) => T;
      callback: (match: RegExpMatchArray) => T;
    }

Declared in src/plugin.ts.

IWatcher

type IWatcher<T> = {
  bundle: boolean;
  debounce: boolean;
  timeoutDelay: number;
  afterMatchDelay: number;
  last: (match: T) => boolean;
  callback: () => void;
  resolve: (...args: any[]) => void;
  remove: () => void;
  done: () => void;
  timeout: ReturnType<typeof setTimeout>;
} & (
  | {
      pattern: WatcherPattern<T>;
      matches: T[];
    }
  | {
      pattern: RegExp;
      matches: RegExpMatchArray[];
    }
)

Declared in src/plugin.ts.

WatcherPattern

type WatcherPattern<T> = (
  line: string,
  match: RegExpMatchArray | null,
) => T | RegExpMatchArray | null | undefined | '[OMEGGA_WATCHER_DONE]'

Declared in src/plugin.ts.