Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Bill3621/CustomItems/llms.txt

Use this file to discover all available pages before exploring further.

Commands

CustomItems LabAPI includes built-in server commands for managing custom items in-game. These commands are available through the Remote Admin console and game console.

customItem

Give a player a specified custom item by ID. Command: customItem (alias: ci) Permission required: GivingItems Usage:
customItem <itemId> [player]

Parameters

itemId
ushort
required
The ID of the custom item to give. Use the command without arguments to see all registered items and their IDs.
player
string
The target player. Can be:
  • Player ID (numeric)
  • Player UserID
  • Player nickname (partial match supported)
  • * or all to give to all eligible players
If omitted, gives the item to yourself (when executed by a player).

Eligibility requirements

Players must meet these conditions to receive custom items:
  • Must be alive
  • Must not be disarmed
  • Must have fewer than 8 items in inventory

Examples

# List all registered custom items
customItem

# Give item ID 0 to yourself
customItem 0

# Give item ID 1 to player "John"
customItem 1 John

# Give item ID 2 to all eligible players
customItem 2 all

Response format

CustomItemCommand.cs:64
response = $"{item.Name} given to {player.Nickname} ({player.UserId})";
For multiple players:
CustomItemCommand.cs:79
response = $"{item.Name} given to all players who can receive them ({eligiblePlayers.Count} players)";

tppos

Teleport to a specified position (debug command). Command: tppos (alias: tpp) Permission required: Noclip Usage:
tppos <x> <y> <z>

Parameters

x
float
required
X coordinate in world space
y
float
required
Y coordinate in world space
z
float
required
Z coordinate in world space
This command is primarily for debugging spawn positions. Coordinates can include commas, which will be automatically removed during parsing.

Examples

# Teleport to coordinates (100, 50, 200)
tppos 100 50 200

# Coordinates with commas (will be parsed correctly)
tppos 100,5 50,0 200,3

Implementation

TPPos.cs:36-45
if (!float.TryParse(arguments.At(0).Replace(",", ""), out float x) ||
    !float.TryParse(arguments.At(1).Replace(",", ""), out float y) ||
    !float.TryParse(arguments.At(2).Replace(",", ""), out float z))
{
    response = "Invalid coordinates.";
    return false;
}

Vector3 position = new Vector3(x, y, z);
player.Position = position;

Common patterns

Using commands for testing

Commands are useful during development to test custom items:
# 1. List all registered items to find the ID
customItem

# 2. Give yourself the item to test
customItem 0

# 3. Teleport to a specific location to test spawning
tppos 100 50 200

Permission requirements

Both commands check permissions before execution:
CustomItemCommand.cs:25-29
if (!sender.CheckPermission(PlayerPermissions.GivingItems))
{
    response = "Permission Denied, required: " + PlayerPermissions.GivingItems;
    return false;
}

Build docs developers (and LLMs) love