Skip to content

Quick Start

firesmasher-c6 edited this page Jun 20, 2026 · 1 revision

Quick Start

Create your first Coder script in just 5 minutes. No Java knowledge required!

๐ŸŽฏ What You'll Learn

By the end of this guide, you'll be able to:

โœ… Create a basic script file
โœ… Use broadcast and send commands
โœ… Execute your script on the server
โœ… Understand basic Coder syntax

Time Required: 5 minutes
Difficulty: โญ Beginner


Step 1: Create Your First Script (1 min)

Location

Scripts go in /plugins/Coder/scripts/ folder

File Name

Create a new file called: hello.cd

Note: .cd extension stands for "Coder DSL"

Content

Copy this into hello.cd:

# My first Coder script!
 
# Broadcast a message to all players
broadcast "Hello everyone! Coder is working!"
 
# Send a message to the console
console.log "Script executed successfully!"

Step 2: Execute Your Script (30 sec)

In-Game

  1. Join your server
  2. Type in chat: /coder run hello
  3. Press Enter You should see:
  • Message in chat: Hello everyone! Coder is working!
  • Message in console: Script executed successfully!

Via Console

Or from server console, type:

coder run hello

Step 3: Try More Commands (2 min)

Example 1: Send to Specific Player

Create greet.cd:

send "Welcome to the server!" to Steve
send "Hello Admin!" to Admin

Run: /coder run greet

Example 2: Multiple Messages

Create announcer.cd:

broadcast "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"
broadcast "Welcome to MyAwesomeServer!"
broadcast "Website: example.com"
broadcast "Discord: discord.gg/invite"
broadcast "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"

Run: /coder run announcer

Example 3: Variables

Create counter.cd:

var playerCount = 5
var serverName = "Creative Server"
 
broadcast "Server: {serverName}"
broadcast "Current players: {playerCount}"
broadcast "Max players: 20"

Run: /coder run counter

Step 4: Understanding the Basics (1.5 min)

Comments

Lines starting with # are comments (ignored by Coder):

# This is a comment
broadcast "This runs!"  # And this line runs too

Broadcast Command

Send message to ALL players:

broadcast "Message here"

Shows in chat for everyone on the server.

Send Command

Send message to SPECIFIC player:

send "Message here" to PlayerName

Variables

Store information:

var myVariable = 42
var serverName = "MyServer"
 
broadcast "The answer is {myVariable}"
broadcast "Server: {serverName}"

Console Logging

Log to server console:

console.log "Debug message"

๐Ÿ“‹ Basic Syntax Cheat Sheet

# Comments - use # for single line
broadcast "Message"              # Send to all players
send "Message" to PlayerName     # Send to specific player
console.log "Message"            # Log to console
 
var name = "value"               # Create variable
var count = 42                   # Numbers work too
var enabled = true               # Booleans work too
 
broadcast "Value is {variable}"  # Use variables with {}

๐ŸŽฎ Practical Examples

Auto-Restart Message

Create restart-alert.cd:

broadcast "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"
broadcast "โš ๏ธ  SERVER RESTARTING SOON!"
broadcast "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"
broadcast "Time remaining: 5 minutes"
broadcast "Save your work!"
broadcast "โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€"

Daily Rewards Notice

Create daily-rewards.cd:

broadcast "โœจ Daily Rewards Available!"
broadcast "Type /rewards to claim your gift"
broadcast "Check back tomorrow for more!"

Server Rules

Create rules.cd:

broadcast "๐Ÿ“œ SERVER RULES"
broadcast "1. Be respectful to all players"
broadcast "2. No griefing or stealing"
broadcast "3. No offensive language"
broadcast "4. Have fun!"
send "Rules acknowledged!" to Admin

โœ… Verification

Your script worked if you see:

  1. โœ… Message appears in game chat
  2. โœ… Message appears in server console
  3. โœ… No error messages
  4. โœ… /coder list shows your script file

๐Ÿš€ Next Steps

Now that you understand the basics:

  1. Learn More: Read Syntax Reference for all commands
  2. Explore: Check Examples & Tutorials for real use cases
  3. Master: Study Advanced Scripting techniques
  4. Integrate: Learn about Addons like CodeDSL and CoderJSLoader

๐Ÿ’ก Tips

File Naming

  • Use descriptive names: announcer.cd, welcome.cd, reminder.cd
  • Use lowercase with hyphens: daily-rewards.cd (not DailyRewards.cd)
  • One script per file is best practice

Debugging

  • Check server console for error messages
  • Use console.log to debug script flow
  • Run /coder list to verify your script is recognized

Performance

  • Keep scripts short and focused
  • Use memory loading for frequently-run scripts: /coder load scriptname
  • Monitor execution time in logs

โŒ Common Mistakes

Mistake Fix
broadcast Hello (no quotes) Use quotes: broadcast "Hello"
Script in wrong folder Place in /plugins/Coder/scripts/
Wrong file extension Use .cd not .txt or .java
Typo in player name Double-check capitalization and spelling
Script doesn't reload Restart server or use /coder reload

๐Ÿ†˜ Troubleshooting

Script Not Found

Error: Script 'hello' not found

Fix: Ensure hello.cd is in /plugins/Coder/scripts/ folder

Syntax Error

Error: Invalid syntax on line 2

Fix: Check quotes, brackets, and spelling on that line

Permission Denied

Error: You don't have permission

Fix: Ensure player has coder.run permission or is OP

Script Not Executing

Script runs but no output

Fix: Check if commands are spelled correctly (case-sensitive)

๐Ÿ“š Resources


Congratulations! ๐ŸŽ‰ You've created your first Coder script!

Want to learn more? Check out the Syntax Reference for the complete list of commands and features.

๐Ÿ“š Coder Wiki


๐Ÿš€ GETTING STARTED

Essential Pages


๐Ÿ“– CORE DOCUMENTATION

Language & Syntax

Addons


๐ŸŽฏ BY SKILL LEVEL

๐Ÿ‘ถ Beginner

  1. Quick Start
  2. Syntax Reference (basic section)
  3. Copy examples from FAQ ๐ŸŽฏ Intermediate
  4. Master Syntax Reference
  5. Learn all Commands
  6. Explore CodeDSL addon ๐Ÿ† Advanced
  7. Deep dive CoderJSLoader
  8. Custom command development
  9. Performance optimization tips

๐Ÿ”— EXTERNAL LINKS

Official Resources

Resource Link
GitHub Repository
Downloads Releases
Modrinth Download
SpigotMC Download

Community

Channel Link
Discord Join Server
Issues Bug Reports
Discussions Q&A

๐Ÿ“Š VERSION INFO

Current: v1.7.4
Released: June 19, 2026
Status: โœ… Active Development

Supported Servers:

  • Paper 1.21 - 26.2
  • Java 21+

๐Ÿ’ก QUICK TIPS

๐Ÿ“Œ New to Coder? Start with Quick Start

๐Ÿ“Œ Looking for a command? Check Commands

๐Ÿ“Œ Need examples? Browse Syntax Reference

๐Ÿ“Œ Can't find answer? Try FAQ


๐Ÿ†˜ SUPPORT

Having issues?

  1. Check FAQ
  2. Review Installation Guide
  3. Create GitHub Issue
  4. Ask on Discord

๐Ÿค CONTRIBUTE

Help improve Coder!


Clone this wiki locally