-
Notifications
You must be signed in to change notification settings - Fork 0
Syntax Reference
Complete reference for all Coder scripting syntax and commands.
Send a message to ALL players on the server:
broadcast "Your message here"
broadcast "Welcome to {serverName}!"
Output: Message appears in chat for all players
Send message to specific player(s):
send "Message" to PlayerName
send "Admin alert!" to Admin
send "Welcome!" to Steve
Note: Player name is case-sensitive. Use exact username.
Log messages to server console:
console.log "Debug message"
console.log "Player count: {playerCount}"
Multi-line console logging
console.log {
This is a multi-line
console message
Very useful for debugging
}
Output: Message appears in server console only (not in-game)
Execute server commands:
execute command "say Hello everyone!" in console
execute command "give Steve diamond 64" in console
execute command "tp Steve 0 64 0" in console
Format: execute command "command_here" in console
Create and store values:
var playerCount = 5
var serverName = "My Awesome Server"
var version = "1.0"
var enabled = true
Use variables in messages:
var players = 10
var maxPlayers = 20
broadcast "Players online: {players}/{maxPlayers}"
broadcast "Server: {serverName}"
console.log "Version: {version}"
| Type | Example | Usage |
|---|---|---|
| String | "Hello" | Text messages, player names |
| Number | 42, 3.14 | Counts, durations, scores |
| Boolean | true, false | On/off flags, conditions |
| List | [1, 2, 3] | Multiple values |
var serverName = "Creative Hub"
var ownerName = "Admin"
var maxPlayers = 50
var version = "2.1"
broadcast "════════════════════════════"
broadcast "Welcome to {serverName}!"
broadcast "Owner: {ownerName}"
broadcast "Version: {version}"
broadcast "Max Players: {maxPlayers}"
broadcast "════════════════════════════"
Execute code conditionally:
if playerCount is 0:
broadcast "Server is empty!"
if playerCount is 0:
broadcast "No players online"
else:
broadcast "Players are online!"
if playerCount is 0:
broadcast "Server is empty"
else if playerCount is 1:
broadcast "Only 1 player online"
else if playerCount > 5:
broadcast "Server is full!"
else:
broadcast "Few players online"
if value is 10: # Equal to
if value is not 10: # Not equal
if value > 5: # Greater than
if value < 20: # Less than
if value >= 10: # Greater or equal
if value <= 20: # Less or equal
if enabled is true: # Boolean check
if name contains "Steve": # String contains
Define reusable code blocks:
function greetPlayer:
broadcast "Welcome to the server!"
broadcast "Have a great time!"
Call the function
greetPlayer
function welcome[playerName, welcome_message]:
send "{welcome_message}" to {playerName}
send "Thanks for playing!" to {playerName}
Call with parameters
welcome[Steve, "Hello Steve!"]
welcome[Admin, "Welcome back!"]
function getServerStatus:
return "Server is running perfectly!"
var status = getServerStatus
broadcast "{status}"
Text values enclosed in quotes:
var greeting = "Hello World"
var message = "Multi-word message here"
broadcast "This is a string: {greeting}"
String Operations:
var text = "Hello"
var combined = "{text} World" # Concatenation
broadcast "Length: {length of combined}"
broadcast "Uppercase: {uppercase of combined}"
broadcast "Lowercase: {lowercase of combined}"
Integer and decimal values:
var count = 42
var decimal = 3.14
var negative = -10
var sum = count + 100
var product = count * 2
broadcast "Sum: {sum}"
True or false values:
var enabled = true
var disabled = false
if enabled is true:
broadcast "Feature is enabled!"
Multiple values in one variable:
var numbers = [1, 2, 3, 4, 5]
var names = ["Steve", "Alex", "Admin"]
broadcast "First number: {numbers[0]}"
broadcast "First name: {names[0]}"
var a = 10
var b = 3
var add = a + b # 13
var subtract = a - b # 7
var multiply = a * b # 30
var divide = a / b # 3.33
var modulo = a % b # 1 (remainder)
var power = a ^ b # 1000 (10^3)
if 5 > 3: # Greater than
broadcast "True!"
if 5 < 10: # Less than
broadcast "True!"
if 5 >= 5: # Greater or equal
broadcast "True!"
if 10 <= 20: # Less or equal
broadcast "True!"
if value is 42: # Equal
broadcast "Found it!"
if value is not 0: # Not equal
broadcast "Non-zero!"
var a = true
var b = false
if a and b: # Both must be true
broadcast "Both true"
if a or b: # At least one true
broadcast "One or both true"
if not a: # Opposite of value
broadcast "a is false"
var text = "Hello World"
if text contains "World":
broadcast "Found it!"
if text starts with "Hello":
broadcast "Greeting detected!"
if text ends with "World":
broadcast "Ends with World!"
Lines that are ignored by Coder. Useful for documentation.
# This is a comment
var count = 5 # This is also a comment
Broadcast a welcome message
broadcast "Welcome!"
#
# This is a multi-line comment
# It spans across multiple lines
# Very useful for documentation
#
broadcast "Code continues here"
# Check if server needs restart
if uptimeHours > 24:
broadcast "Server restart in 1 hour!"
Store player information
var playerStats = {
name: "Steve",
level: 42,
joined: "2026-01-15"
}
# Delay in ticks (20 ticks = 1 second)
delay 20
broadcast "This message appears after 1 second"
Or use time units
wait 1s # 1 second
wait 2m # 2 minutes
wait 5t # 5 ticks
# Run code every X time
every 30s:
broadcast "This runs every 30 seconds"
every 5m:
console.log "5 minutes have passed!"
# Loop through numbers
for i from 1 to 5:
broadcast "Count: {i}"
Loop through list
for player in playerList:
send "Hello!" to {player}
Putting it all together:
# Daily Server Announcement Script
# Version 2.0
var serverName = "Creative Central"
var ownerName = "Administrator"
var version = "2.0"
var playerLimit = 50
Function to show header
function showHeader:
broadcast "═══════════════════════════════════"
Function to show footer
function showFooter:
broadcast "═══════════════════════════════════"
Main announcement
showHeader
broadcast "Welcome to {serverName}!"
broadcast "Owner: {ownerName}"
broadcast "Version: {version}"
showFooter
Check player count
var onlinePlayers = 5
if onlinePlayers > 20:
broadcast "⚠️ Server is getting full!"
broadcast "Current: {onlinePlayers}/{playerLimit}"
else:
broadcast "✅ Server status: Normal"
broadcast "Players online: {onlinePlayers}"
Schedule reminder every 10 minutes
every 10m:
broadcast "Visit {serverName} website for rules!"
- More Examples: See Examples & Tutorials
- Advanced Topics: Read Advanced Scripting
- Troubleshooting: Check Troubleshooting guide
- Command Reference: View Commands page
Ready to script! Start creating amazing scripts with Coder! 🚀
# Syntax ReferenceComplete reference for all Coder scripting syntax and commands.
- [Basic Commands](#basic-commands)
- [Variables](#variables)
- [Control Flow](#control-flow)
- [Functions](#functions)
- [Data Types](#data-types)
- [Operators](#operators)
- [Comments](#comments)
Send a message to ALL players on the server:
broadcast "Your message here"
broadcast "Welcome to {serverName}!"
Output: Message appears in chat for all players
Send message to specific player(s):
send "Message" to PlayerName
send "Admin alert!" to Admin
send "Welcome!" to Steve
Note: Player name is case-sensitive. Use exact username.
Log messages to server console:
console.log "Debug message"
console.log "Player count: {playerCount}"
# Multi-line console logging
console.log {
This is a multi-line
console message
Very useful for debugging
}
Output: Message appears in server console only (not in-game)
Execute server commands:
execute command "say Hello everyone!" in console
execute command "give Steve diamond 64" in console
execute command "tp Steve 0 64 0" in console
Format: execute command "command_here" in console
Create and store values:
var playerCount = 5
var serverName = "My Awesome Server"
var version = "1.0"
var enabled = true
Use variables in messages:
var players = 10
var maxPlayers = 20
broadcast "Players online: {players}/{maxPlayers}"
broadcast "Server: {serverName}"
console.log "Version: {version}"
| Type | Example | Usage |
|---|---|---|
| String | "Hello" |
Text messages, player names |
| Number |
42, 3.14
|
Counts, durations, scores |
| Boolean |
true, false
|
On/off flags, conditions |
| List | [1, 2, 3] |
Multiple values |
var serverName = "Creative Hub"
var ownerName = "Admin"
var maxPlayers = 50
var version = "2.1"
broadcast "════════════════════════════"
broadcast "Welcome to {serverName}!"
broadcast "Owner: {ownerName}"
broadcast "Version: {version}"
broadcast "Max Players: {maxPlayers}"
broadcast "════════════════════════════"
Execute code conditionally:
if playerCount is 0:
broadcast "Server is empty!"
if playerCount is 0:
broadcast "No players online"
else:
broadcast "Players are online!"
if playerCount is 0:
broadcast "Server is empty"
else if playerCount is 1:
broadcast "Only 1 player online"
else if playerCount > 5:
broadcast "Server is full!"
else:
broadcast "Few players online"
if value is 10: # Equal to
if value is not 10: # Not equal
if value > 5: # Greater than
if value < 20: # Less than
if value >= 10: # Greater or equal
if value <= 20: # Less or equal
if enabled is true: # Boolean check
if name contains "Steve": # String contains
Define reusable code blocks:
function greetPlayer:
broadcast "Welcome to the server!"
broadcast "Have a great time!"
# Call the function
greetPlayer
function welcome[playerName, welcome_message]:
send "{welcome_message}" to {playerName}
send "Thanks for playing!" to {playerName}
# Call with parameters
welcome[Steve, "Hello Steve!"]
welcome[Admin, "Welcome back!"]
function getServerStatus:
return "Server is running perfectly!"
var status = getServerStatus
broadcast "{status}"
Text values enclosed in quotes:
var greeting = "Hello World"
var message = "Multi-word message here"
broadcast "This is a string: {greeting}"
String Operations:
var text = "Hello"
var combined = "{text} World" # Concatenation
broadcast "Length: {length of combined}"
broadcast "Uppercase: {uppercase of combined}"
broadcast "Lowercase: {lowercase of combined}"
Integer and decimal values:
var count = 42
var decimal = 3.14
var negative = -10
var sum = count + 100
var product = count * 2
broadcast "Sum: {sum}"
True or false values:
var enabled = true
var disabled = false
if enabled is true:
broadcast "Feature is enabled!"
Multiple values in one variable:
var numbers = [1, 2, 3, 4, 5]
var names = ["Steve", "Alex", "Admin"]
broadcast "First number: {numbers[0]}"
broadcast "First name: {names[0]}"
var a = 10
var b = 3
var add = a + b # 13
var subtract = a - b # 7
var multiply = a * b # 30
var divide = a / b # 3.33
var modulo = a % b # 1 (remainder)
var power = a ^ b # 1000 (10^3)
if 5 > 3: # Greater than
broadcast "True!"
if 5 < 10: # Less than
broadcast "True!"
if 5 >= 5: # Greater or equal
broadcast "True!"
if 10 <= 20: # Less or equal
broadcast "True!"
if value is 42: # Equal
broadcast "Found it!"
if value is not 0: # Not equal
broadcast "Non-zero!"
var a = true
var b = false
if a and b: # Both must be true
broadcast "Both true"
if a or b: # At least one true
broadcast "One or both true"
if not a: # Opposite of value
broadcast "a is false"
var text = "Hello World"
if text contains "World":
broadcast "Found it!"
if text starts with "Hello":
broadcast "Greeting detected!"
if text ends with "World":
broadcast "Ends with World!"
Lines that are ignored by Coder. Useful for documentation.
# This is a comment
var count = 5 # This is also a comment
# Broadcast a welcome message
broadcast "Welcome!"
#
# This is a multi-line comment
# It spans across multiple lines
# Very useful for documentation
#
broadcast "Code continues here"
# Check if server needs restart
if uptimeHours > 24:
broadcast "Server restart in 1 hour!"
# Store player information
var playerStats = {
name: "Steve",
level: 42,
joined: "2026-01-15"
}
# Delay in ticks (20 ticks = 1 second)
delay 20
broadcast "This message appears after 1 second"
# Or use time units
wait 1s # 1 second
wait 2m # 2 minutes
wait 5t # 5 ticks
# Run code every X time
every 30s:
broadcast "This runs every 30 seconds"
every 5m:
console.log "5 minutes have passed!"
# Loop through numbers
for i from 1 to 5:
broadcast "Count: {i}"
# Loop through list
for player in playerList:
send "Hello!" to {player}
Putting it all together:
# Daily Server Announcement Script
# Version 2.0
var serverName = "Creative Central"
var ownerName = "Administrator"
var version = "2.0"
var playerLimit = 50
# Function to show header
function showHeader:
broadcast "═══════════════════════════════════"
# Function to show footer
function showFooter:
broadcast "═══════════════════════════════════"
# Main announcement
showHeader
broadcast "Welcome to {serverName}!"
broadcast "Owner: {ownerName}"
broadcast "Version: {version}"
showFooter
# Check player count
var onlinePlayers = 5
if onlinePlayers > 20:
broadcast "⚠️ Server is getting full!"
broadcast "Current: {onlinePlayers}/{playerLimit}"
else:
broadcast "✅ Server status: Normal"
broadcast "Players online: {onlinePlayers}"
# Schedule reminder every 10 minutes
every 10m:
broadcast "Visit {serverName} website for rules!"
- More Examples: See [Examples & Tutorials](Examples-and-Tutorials)
- Advanced Topics: Read [Advanced Scripting](Advanced-Scripting)
- Troubleshooting: Check Troubleshooting guide
- Command Reference: View [Commands](Commands) page
Ready to script! Start creating amazing scripts with Coder! 🚀
| Need Help? | Where to Go |
|---|---|
| 🤔 General Question | FAQ or Discord |
| 🐛 Found a Bug | GitHub Issues |
| 💬 Quick Chat | Discord Community |
| 📖 Can't Find Docs | Home for navigation |
We welcome contributions from the community!
- Report Bugs: Create an Issue
- Improve Wiki: Edit Pages
- Submit Code: Open a PR
Main Pages: Home • Installation Guide • Quick Start • Syntax Reference • Commands • FAQ
| Item | Details |
|---|---|
| Latest Version | v1.7.4 (June 19, 2026) |
| Status | ✅ Active Development |
| License | MIT License |
| Author | Firesmasher |
| Server Type | Paper/Spigot 1.21 - 26.2 |
| Java Version | 21+ |
Give us a Star! • Follow on GitHub • Join Discord
Made with ❤️ for the Minecraft Community
Coder is a lightweight scripting plugin for Minecraft servers
Contribute • Report Issues • Share Feedback • Have Fun!
Last Updated: June 2026 | Report Wiki Issue
- Home - Wiki overview & features
- Installation Guide - Setup in 5 minutes
- Quick Start - Your first script
- FAQ - Common questions
- Syntax Reference - All commands & syntax
- Commands - Plugin commands & permissions
- CodeDSL - DSL scripting addon
- CoderJSLoader - JavaScript addon
👶 Beginner
- Quick Start
- Syntax Reference (basic section)
- Copy examples from FAQ 🎯 Intermediate
- Master Syntax Reference
- Learn all Commands
- Explore CodeDSL addon 🏆 Advanced
- Deep dive CoderJSLoader
- Custom command development
- Performance optimization tips
| Resource | Link |
|---|---|
| GitHub | Repository |
| Downloads | Releases |
| Modrinth | Download |
| SpigotMC | Download |
| Channel | Link |
|---|---|
| Discord | Join Server |
| Issues | Bug Reports |
| Discussions | Q&A |
Current: v1.7.4
Released: June 19, 2026
Status: ✅ Active Development
Supported Servers:
- Paper 1.21 - 26.2
- Java 21+
📌 New to Coder? Start with Quick Start
📌 Looking for a command? Check Commands
📌 Need examples? Browse Syntax Reference
📌 Can't find answer? Try FAQ
Having issues?
- Check FAQ
- Review Installation Guide
- Create GitHub Issue
- Ask on Discord
Help improve Coder!
- 🐛 Report Bugs
- 🧵 Threads
- 📝 Improve Wiki