Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
World Start Commands and Global Gamerules

World Start Commands and Global Gamerules

Run commands on world creation, allows for global gamerules compatible with any mod!

5,756
2
Game Mechanics
Management
Utility

Compatibility

Minecraft: Java Edition

1.21.x
1.20.5–1.20.6
1.20–1.20.1
1.19.x

Platforms

Forge
NeoForge

Supported environments

Server-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

View source Join Discord server

Creators

acewins
acewins Member

Details

Licensed GPL-3.0-only
Published 11 months ago
Updated 4 months ago
DescriptionChangelogVersions

also available on curseforge (much worse)

This mod is originally made for setting global gamerules that will apply to every world but it works with any other commands.

v1 description

When you first start your game the mod will create a file called WSCommands.json in your config folder which is formatted like so:

{
  "Repeat": false,
  "DedicatedMode": false,
  "1": "[command1]",
  "2": "[command2]",
  "3": "[command3]"
}

The mod will run the commands in order every time you load into a new world.
Make sure to not skip any numbers.
Don't forget the commas.
The commands don't include the /

example:

{
  "Repeat": false,
  "DedicatedMode": false,
  "1": "effect give @a minecraft:resistance",
  "2": "gamerule keepInventory true",
  "3": "gamerule doInsomnia false",
  "4": "give @r minecraft:diamond"
}

this will first give the resistance effect to every player, then set keepInventory to true and doInsomnia to false, then give a diamond to a random player in the world

If Repeat is set to true, the commands will run every single time the world is loaded (or every time a player joins the world if DedicatedMode is set to true.)
If DedicatedMode is set to true, the commands will run for every single player that joins the world for the first time.

important:

/wsc [target] forcerun will run the commands directly
/wsc [target] reset will run the commands again the next time you load the current world
/wsc null is a command that does not do anything

Commands don't run at world creation ? Try doing /wsc forcerun (need OP), if it shows a message in red saying it was unable to run the command, you probably forgot a comma somewhere in your config (all lines have a comma except the last one)

Commands do run but gamerules aren't set ? Minecraft is very specific with the capitalization of the gamerules (gamerule keepinventory or gamerule Keepinventory for example will NOT work as the correct capitalization is gamerule keepInventory)

Be very careful when going from a command block directly to the json file as you have to replace anything inside the command that the json format uses (ex: \ becomes \\, " becomes \" and ' becomes \')

A config file called WSCommands.toml will be generated in the config folder, most important information should be contained there

Join my discord server for support about my mods!

icon was taken on game-icons.net

Modrinth is open source.

sidebar-refinement@948af2b

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.