Skip to content

@lands.io/mod-sdk / NoOpExecution

Class: NoOpExecution

A no-op execution that does nothing. Useful as a return value when an action should not execute.

Table of contents

Constructors

Methods

Constructors

constructor

new NoOpExecution(): NoOpExecution

Returns

NoOpExecution

Methods

activeDuringSpawnPhase

activeDuringSpawnPhase(): boolean

Returns

boolean


init

init(): void

Returns

void


isActive

isActive(): boolean

Returns

boolean


owner

owner(): null

Returns

null


tick

tick(): void

Returns

void


Source Code

View full implementation
/**
 * A no-op execution that does nothing.
 * Useful as a return value when an action should not execute.
 */
export class NoOpExecution {
  isActive(): boolean {
    return false;
  }

  activeDuringSpawnPhase(): boolean {
    return false;
  }

  init(): void {
    // No-op
  }

  tick(): void {
    // No-op
  }

  owner(): null {
    return null;
  }
}