Join Commands
RocketJoin allows you to execute commands automatically when players join your server. This is useful for giving starter items, setting up new players, or running any server commands.Overview
Join commands are executed from the console when a player joins. You can use the{player} placeholder in commands to reference the joining player.
Basic Configuration
Commands are configured in the mainconfig.yml file under the commands section:
Disabling Commands
To disable join commands, simply set the commands list to empty:Placeholders
Player Placeholder
The{player} placeholder is replaced with the joining player’s username.
Example:
say Welcome Steve to the server!give Steve diamond 1
Common Use Cases
Starter Kit
Give new players a starter kit when they join:Welcome Message
Send a welcome message to all players:Teleport to Spawn
Teleport players to spawn when they join:Set Player Properties
Set various player properties:Commands in Conditions
You can also set commands for specific conditions. This allows you to execute different commands based on player permissions or other criteria.Example: VIP Starter Kit
Example: First Join Commands
Advanced Examples
Conditional Commands with Multiple Actions
Integration with Other Plugins
You can integrate with other plugins’ commands:Make sure the plugins you’re integrating with support console command execution and the
{player} placeholder format.Best Practices
- Test commands first - Always test commands in-game before adding them to the config to ensure they work as expected.
- Use appropriate permissions - Some commands may require specific permissions. Make sure your server console has the necessary permissions.
- Avoid lag-inducing commands - Be careful with commands that might cause server lag, especially if you have many players joining.
- Order matters - Commands execute in the order they’re listed. Place important commands first.
- Use condition-specific commands - For player-specific actions, use commands in conditions rather than global commands.
Troubleshooting
Q: Commands aren’t executingA: Check that:
- The commands section is not set to
[] - The commands are properly formatted in YAML
- Your server console has permissions to execute the commands
- The plugin is properly loaded
A: Make sure you’re using
{player} (with curly braces) and that the player name is being properly substituted.
Q: Commands execute but failA: Verify that:
- The command syntax is correct
- Required plugins are installed and enabled
- The server has necessary permissions
Security Considerations
- Avoid commands that could be exploited
- Don’t give excessive items or permissions
- Review commands regularly for security issues
Related Guides
- Configuration - General configuration guide
- Conditions - Learn about condition-specific commands