Operator Functions

To make life easier for more technical players of Rocket Riders, here are some useful Operator Functions you can find and use across all the datapacks in the Rocket Riders codebase. Any of these can be run with the command /function [function:name].

Also note that it is preferable to run these in the Developer team (/team join Developer), which has no restrictions on the player’s gamemode or location and minimal interactions with usual game functionality.


game:forcestop

This function immediately stops the game and opens the Modification Room. It may be run at any point in the game and is very useful in case things go wrong or if you’re done testing in singleplayer.


game:forcestart

This function attempts to immediately start the game. It should only be run and will only succeed once game settings have been confirmed in the Modification Room.


game:forcecountdown

This function immediately starts the game countdown, even when the minimum number of players is not met for a countdown to automatically start.


game:unforcecountdown

This function reverses the effects of game:forcecountdown by reinstating the requirement for a minimum number of players for a countdown to begin.


game:restartcountdown

This function restarts the game countdown at 30 (or 10) seconds.


game:cancelblue and game:uncancelblue

These function disable or enable the Blue team join pad.


game:cancelyellow and game:uncancelyellow

These functions disable or enable the Yellow team join pad.


game:uncancelpads

This function enables all team join pads (including Spectators).


items:missile/[category]/give[name]

Functions of this format give the player a missile of the specified category and name, colored after their team. This can only be run when the player is on Blue or Yellow team.

[category] may be normal, heavy, lightning, or special, and [name] is an abbreviated name of the missile in that category. For instance, items:missile/heavy/giveaux gives an Auxiliary.


items:util/give[name]

Functions of this format give the player a utility of the specfied name, colored after their team. This can only be run when the player is on Blue or Yellow team.

Note that other gamemodes may add their own items folder with custom utility items and their own respective give functions. The format for these would generally be rr_[gamemode]:items/util/give[name].

For Powerups Mode specifically, the util folder is instead named either tipped_arrow for all tipped arrows or powerup for all non-tipped arrow powerup items.

For instance, function rr_powerups:items/powerup/givetotem gives the player a Totem of Undying.


arenaclear:testvalidclear

This function attempts to run an arena clear, but only succeeds if the following prerequisite conditions are met:


arenaclear:forceareaclear

This function forcibly clears and resets the arena, ignoring any gamemode-specific arena clearing or prerequisite checks that would otherwise occur during a normal arena clear. It is not recommended to use this in case prerequisite conditions for arena clearing are not met (see above).


achievements:reset

This function resets all achievement progress for the executor.


achievements:roots

This function grants the root advancements for the executor in each tab of the advancements menu.


custom:leave

This function simulates the executor relogging by adding 1 to their leaveGame score, thereby putting them back into the Lobby team with the appropriate effects and teleporting them to the Lobby area.


lobby:parkour/parkoursetup

This function wipes the Parkour leaderboard and all stored times for all players in this Rocket Riders world.


lobby:missiledisplay/givebook

This function gives the executor a copy of the Missile Display Area book, in case the original copy in the lectern is lost or changed.


rr_[gamemode]:install and rr_[gamemode]:uninstall

These functions will install or uninstall the specified gamemode (ex. rr_powerups:install installs Powerups Mode). See install and uninstall functions under Gamemode Datapacks for more detailed information.


Any others?

Most other functions in the Rocket Riders codebase are only designed to be run by the Selection armor stand, as they are not safe for normal operator use.

If you ever find yourself needing to run one of these (and if you know what you’re doing), make sure to preface the function call with “/execute as @e[type=armor_stand,tag=Selection] run ”.