ALERT: This website is being migrated to mc.zerotoil.net. Please navigate to the new website for updated information.

Setting up a world config

How to setup a world configuration

This article is not up to date. Please use correct commands from the Commands section until this section is fixed.

Prerequisites

Before beginning the setup process, make sure the world you want to reset is loaded. An unloaded world will NOT be recognized by CyberWorldReset and you will not be able to create a setup.

Multiverse is recommended to load in additional worlds.

At this point, you can choose to create a world setup via the worlds.yml file or using built-in commands. Let me run you through both:


Setup using commands

  • <> - replace with necessary field
  • [ ] - optional, select choice from within the brackets

You must be in the desired world to use optional fields

TIP: You can view a setup's current settings using /cwr info [<world>].


1. Start by creating a world configuration using /cwr create [<world>].

NOTE: Default worlds CANNOT be unloaded by plugins, so you cannot reset them.


2. Are you planning to restore to the current condition (or want to back up the world)?

If not, skip this step - The world will completely reset.

  • Save the world using the command /cwr save [<world>]. If you want to restore the world while it resets, enable the option using /cwr edit <world> enabledLastSaved true.

3. Would you like to setup a scheduler to automatically reset your world?

If not, skip this step - You will have to manually reset the world via command.

  • Add a timer using /cwr edit <world> addTimer <timer>. Refer to the 'Using a scheduler' guide to properly setup your scheduler..

TIP: remove a timer using /cwr edit <world> delTimer <index>.


4. Do you want the world to reset with a different seed?

If not, skip this step - it will regenerate with the same seed.

  • Set your seed using /cwr edit <world> setSeed <seed>.

You can use DEFAULT to keep the same seed or RANDOM for a random seed.


5. Would you like to send a message when the world regenerates?

If not, skip this step - no message will be sent.

  • Add a message using /cwr edit <world> addMessage <message>.

TIP: remove a message using /cwr edit <world> delMessage <index>.


6. Should a warning message be sent [x] seconds before the reset?

If not, skip this step - no warning message will be sent.

  • Add a warning message using /cwr edit <world> addWarningMSG <message>.
  • Optional: Add a time before reset using /cwr edit <world> addWarningTime <time>.
  • Title and subtitle can only be setup in worlds.yml. Command coming soon...

TIP: remove a message using /cwr edit <world> delWarningMSG <index> and remove a time using /cwr edit <world> delWarningTime <index>.

  • Finally, enable warning messages using /cwr edit <world> enableWarning true.

7. Should players be teleported to a safe world while the world is resetting?

If not, skip this step - players will be kicked until world has reset.

  • Select a world that players should teleport to while the reset occurs using /cwr edit <world> setSafeWorld <world>.
  • Set a location within the safe world that players should teleport to using /cwr edit <world> setSafeWorldSpawn <default|<x>, <y>, <z>, <yaw>, <pitch>>.
  • Optional: Set a delay before teleporting back using /cwr edit <world> setSafeWorldDelay <seconds>.

TIP: disable teleporting back by setting the delay to -1.

  • Finally, enable the safe world using /cwr edit <world> enableSafeWorld true.

8. Should command(s) be run before or after the reset?

If not, skip this step - no commands will be run.

  • Add a command using /cwr edit <world> addCommand <command>.

TIP: remove a command using /cwr edit <world> delCommand <index>.

You can use a prefix to have the console command be run for a specific group of people:

  • [initial:all-players] - pre-reset command that is run for all online players.
  • [initial:world-players] - pre-reset command that is run for all players from the resetting world.
  • [initial:world-players:world_name] - pre-reset command that is run for all players within a world.
  • [initial] - pre-reset general command (only run once).
  • [all-players] - post-reset command that is run for all online players.
  • [world-players] - post-reset command that is run for all players from the resetting world.
  • [world-players:world_name] - post-reset command that is run for all players within a world.
  • [general] - post-reset general command (only run once).

NOTE: if you do not put a prefix, it will run as if it was a general command. Commands are run from console perspective.

Example: [world-players] eco give {player} 25 will give all players that were within the resetting world 25 economy after the reset occurs.

The following placeholders are supported:
  • {player}
  • {playerUUID}
  • {playerDisplayName}
  • {world}

9. Enable the world setup (finally!)

WARNING: Before enabling a region, please make sure all desired settings are set to your desire (steps 2 - 8). Once the setup is enabled, all existing timers will initialize and resets are IRREVERSIBLE unless you have a backup as explained in step 2.

TIP: check your settings using /cwr info <world> and make sure they are correct.

  • Finally, enable your world using /cwr edit <world> setEnabled true.

If you chose to reset your world manually, you can do so using /cwr regen <world>.


Placeholders
Setting up a world config
Using a scheduler