
World Primer Mod Description
Adding Automated Scenarios to Minecraft
The World Primer mod empowers the server with automatic command execution in response to various gameplay events. You can configure actions to be performed when creating a new world, loading dimensions, connecting or disconnecting players, their death or resurrection. Scheduled periodic commands are also supported.
Trigger System Configuration
All parameters are configured through the in-game configuration menu.
Important: Make sure to study the comments in the configuration file! They contain all possible string substitutions as well as additional important information. Many parameters and command prefixes have changed between mod versions, so the comments in the configuration file are the most accurate information source for your version.
Important Note: Commands in the configuration file should not contain the slash symbol at the beginning! The slash is only used in chat or server console to denote commands. An exception are World Edit commands, which usually use double slash in chat - for them, a single slash should be specified in the configuration.
Command Settings for Different Events
dimensionLoadingCommands
- executed every time a dimension loadsearlyWorldCreationCommands
- executed during initial world creation, before spawn chunks have been generated and loadedearlyWorldLoadingCommands
- executed every time the world loads (when server starts), before any worlds have been loadedplayerChangedDimensionEnterCommands
- executed when a player enters another dimension (after the actual transition)playerChangedDimensionLeaveCommands
- executed when a player leaves a dimension while changing dimensions (Important: executed after transitioning to the new dimension)playerDeathCommands
- executed when a player diesplayerJoinCommands
- executed when a player connects to the serverplayerQuitCommands
- executed when a player disconnects from the serverplayerRespawnCommands
- executed when a player respawns after deathpostWorldCreationCommands
- executed during initial world creation, after spawn chunks have been generated and loadedpostWorldLoadingCommands
- executed every time the world loads (when server starts), after the Overworld spawn chunks have been loaded
Periodic Commands
timedCommands
- executed based on game time. Format:worldprimer-timed-command <time> <dimension> <command>
, where<time>
is total world time in ticks- Time can be prefixed with a
%
symbol for periodic execution with the specified interval - With periodic time, offsets can be used:
worldprimer-timed-command %1200-80 0 say Something will happen in 4 seconds!
worldprimer-timed-command %1200 0 say Something happens now!
worldprimer-timed-command %1200+80 0 say Something happened 4 seconds ago!
In the "Toggles" category, there are separate settings to enable or disable all these functions, allowing temporary deactivation of commands without deleting them.
Additional Settings
enableDebugLogging
- displays messages and information about command execution for tracking eventsenableDimensionLoadTracking
/enableDataTracking
- enables tracking of dimension load counts, server startups, player connections, etc. Required for count-based prefixes to work
It is recommended to use the enableDebugLogging
option when testing settings!
Command Prefixes for Filtering
worldprimer-dim-command
Allows executing dimension loading commands only when a specific dimension loads:
worldprimer-dim-command <dimension id> <command>
For example:
worldprimer-dim-command 1 say The End dimension has loaded!
If using just a command without the prefix in dimensionLoadingCommands
, it will be executed when any dimension loads.
worldprimer-dim-command-nth
Executes a command on a specific (or multiple) number of dimension loads. Requires the enableDimensionLoadTracking
option to be enabled.
Syntax (version 0.6.0 and newer):
worldprimer-dim-command-nth <load count> <dimension id> <command>
Examples:
worldprimer-dim-command-nth 1 -1 say The Nether has loaded for the first time!
worldprimer-dim("-command-nth 6 1 say The End has loaded for the sixth time!
worldprimer-dim-command-nth %5 1 say The number of End loads is a multiple of 5!
Note: The argument order for this prefix has changed between mod versions!
worldprimer-tracked-command-nth
Restricts player-specific command execution based on event count. For example in playerRespawnCommands
:
worldprimer-tracked-command-nth 3 say Player {PLAYER_NAME} has respawned for the third time at {PLAYER_X}, {PLAYER_Y}, {PLAYER_Z}
worldprimer-tracked-command-nth %5 say Player {PLAYER_NAME} has respawned a multiple of 5 times
String Substitutions in Commands
Supports substitution of various values in commands with simple arithmetic operations.
Available Substitutions for All Commands:
{DIMENSION}
- Dimension ID{RAND:min,max}
- Random numbers, for example{RAND:5,15}
or{RAND:1.2,3.9}
{SPAWN_X}
,{SPAWN_Y}
,{SPAWN_Z}
- Dimension spawn point coordinates{SPAWN_POINT_X}
, ... - Spawn point coordinates directly (differs for The End){TIME_TICK}
- Total world time in ticks{TIME_TICK_DAY}
- Day time in ticks{TIME_Y}
- Real year (4 digits:2017
){TIME_M}
- Real month (2 digits:03
){TIME_D}
- Real day (2 digits:04
){TIME_H}
- Real hour (2 digits:09
){TIME_I}
- Real minute (2 digits:05
){TIME_S}
- Real second (2 digits:07
){TOP_Y:x,z}
- Y-coordinate of the top block at specified coordinates, for example:{TOP_Y:-37,538}
{TOP_Y_RAND:x,z;x-range,z-range}
- Coordinates of the top block at a random location around a given point
For Player-Specific Commands:
{PLAYER_NAME}
- Player name{PLAYER_X}
,{PLAYER_Y}
,{PLAYER_Z}
- Player's current position{PLAYER_BED_X}
,{PLAYER_BED_Y}
,{PLAYER_BED_Z}
- Last set spawn point (bed){PLAYER_BED_SPAWN_X}
,{PLAYER_BED_SPAWN_Y}
,{PLAYER_BED_SPAWN_Z}
- Alternative spawn point with bed presence check
Substitution Usage Example
Creating an underground spawn chamber in postWorldCreationCommands
:
gameRule spawnRadius 0
setworldspawn {SPAWN_X} 7 {SPAWN_Z}
fill {SPAWN_X}-3 6 {SPAWN_Z}-3 {SPAWN_X}+3 10 {SPAWN_Z}+3 minecraft:cobblestone
fill {SPAWN_X}-2 7 {SPAWN_Z}-2 {SPAWN_X}+2 9 {SPAWN_Z}+2 minecraft:air
This creates a 5x5x3 cobblestone room with an air cavity in the center for player spawning.
Built-In Commands
Schematic Commands
create-structure
- saves an area in .schematic or .nbt formatplace-structure
- places a schematic in the world- Files are saved to
config/worldprimer/structures/
Added in versions:
create-structure
- 1.12.2-0.6.0-dev.20180502.210326place-structure
- 1.12.2-0.6.0-dev.20171010.003436
Tip: Auto-completion works for everything.
/worldprimer create-structure <x1> <y1> <z1> <x2> <y2> <z2> <schematic | vanilla> <name>
/worldprimer place-structure <x> <y> <z> <name> [rotation] [mirror] [centered] [data-functions]
Internal Chunk Loading Command
worldprimer-load-chunks <chunkXMin> <chunkZMin> <chunkXMax> <chunkZMax>
Note: Not a registered command, used only from the configuration file.
Loads a chunk area so commands like /fill
and /setblock
can work in them. Chunks are immediately queued for unloading.
Example for creating a bedrock box in The End on first load:
worldprimer-dim-command-nth 1 1 worldprimer-load-chunks -1 -1 0 0
worldprimer-dim-command-nth 1 1 fill 10 0 10 -10 7 -10 minecraft:bedrock
worldprimer-dim-command-nth 1 1 fill 9 1 9 -9 6 -9 minecraft:air
worldprimer-dim-command-nth 1 1 say Box completed!
Player Distribution Command
/worldprimer spread-player [options] <player_names>
Location search modes: grid
and random
.
Options:
--find-surface=<true | false>
- positioning at the top block--grid=<integer>
- using grid search--max-radius=<integer>
- maximum distance from 0,0--min-separation=<integer>
- minimum distance to other positions and players--new
- generating a new position on re-execution--y=<integer>
- fixed Y height
i>--y-max=<integer>
- maximum Y coordinate--y-min=<integer>
- minimum Y coordinate
--y-offset=<integer>
- offset from surface
Example:
/worldprimer spread-player --find-surface=true --min-separation=1024 --max-radius=10000 --new player_name