Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

teleports

A set of commands to allow players to set their own teleport points and teleport to them.
builtinTakaro >=0.0.1

Components Overview

1
config
10
commands
0
hooks
1
Cron Jobs
1
functions
3
permissions

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (2)

timeoutnumberduration
Timeout

The time one has to wait before teleporting again.

Default: 1000
Constraints: min: 0
allowPublicTeleportsboolean

Players can create public teleports.

Default: false

UI Schema

No configuration properties defined. This module uses default settings.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Commands (10)

These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.

teleport

/tpTrigger Command

Description

Teleports to one of your set locations.

Arguments (1)

tp
stringPosition 0
Help: The location to teleport to.
Default: None

Function Implementation

teleport Function

JAVASCRIPT

Usage Example

Player types: /tp <tp>

tplist

/tplistTrigger Command

Description

Lists all your set locations.

Function Implementation

tplist Function

JAVASCRIPT

Usage Example

Player types: /tplist

settp

/settpTrigger Command

Description

Sets a location to teleport to.

Arguments (1)

tp
stringPosition 0
Help: The location name.
Default: None

Function Implementation

settp Function

JAVASCRIPT

Usage Example

Player types: /settp <tp>

deletetp

/deletetpTrigger Command

Description

Deletes a location.

Arguments (1)

tp
stringPosition 0
Help: The location name.
Default: None

Function Implementation

deletetp Function

JAVASCRIPT

Usage Example

Player types: /deletetp <tp>

setpublic

/setpublicTrigger Command

Description

Sets a teleport to be public, allowing other players to teleport to it.

Arguments (1)

tp
stringPosition 0
Help: The location name.
Default: None

Function Implementation

setpublic Function

JAVASCRIPT

Usage Example

Player types: /setpublic <tp>

setprivate

/setprivateTrigger Command

Description

Sets a teleport to be private, only the teleport owner can teleport to it.

Arguments (1)

tp
stringPosition 0
Help: The location name.
Default: None

Function Implementation

setprivate Function

JAVASCRIPT

Usage Example

Player types: /setprivate <tp>

setwaypoint

/setwaypointTrigger Command

Description

Creates a new waypoint.

Arguments (1)

waypoint
stringPosition 0
Help: The location name.
Default: None

Function Implementation

setwaypoint Function

JAVASCRIPT

Usage Example

Player types: /setwaypoint <waypoint>

deletewaypoint

/deletewaypointTrigger Command

Description

Deletes a waypoint.

Arguments (1)

waypoint
stringPosition 0
Help: The location name.
Default: None

Function Implementation

deletewaypoint Function

JAVASCRIPT

Usage Example

Player types: /deletewaypoint <waypoint>

listwaypoints

/waypointsTrigger Command

Description

Lists all waypoints.

Function Implementation

listwaypoints Function

JAVASCRIPT

Usage Example

Player types: /waypoints

teleportwaypoint

/teleportwaypointTrigger Command

Description

Placeholder command, this will not be used directly. The module will install aliases for this command corresponding to the waypoint names.

Function Implementation

teleportwaypoint Function

JAVASCRIPT

Usage Example

Player types: /teleportwaypoint

About Module Commands

Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

Waypoint reconciler

*/30 * * * *Schedule

Schedule Details

Cron Expression
*/30 * * * *
Human-Readable Schedule

Every 30 minutes

Function Implementation

Waypoint reconciler Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

utils

functionReusable Component

Function Implementation

utils Function

JAVASCRIPT

Import Usage

Import: import { utils } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.

Permissions (3)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

3 permissions

Create Public Teleports

TELEPORTS_CREATE_PUBLICPermission KeyCountable
Description

Allows the player to create public teleports.

Permission Details
Full Key:TELEPORTS_CREATE_PUBLIC
Can Have Count:Yes
Category:General
Countable Permission

This permission supports numeric values/levels. For example, you could grant someone "10" of this permission to limit their usage or set permission levels.

Manage waypoints

TELEPORTS_MANAGE_WAYPOINTSPermission Key
Description

Allows creating, deleting, and managing waypoints.

Permission Details
Full Key:TELEPORTS_MANAGE_WAYPOINTS
Can Have Count:No
Category:General

Use Teleports

TELEPORTS_USEPermission KeyCountable
Description

Allows the player to use teleports modules.

Permission Details
Full Key:TELEPORTS_USE
Can Have Count:Yes
Category:General
Countable Permission

This permission supports numeric values/levels. For example, you could grant someone "10" of this permission to limit their usage or set permission levels.

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.