# Commands¶

WorldGuard provides five categories of commands:

• Gameplay-related (/god, /heal, etc.)
• Working with regions
• Time-sensitive emergency response
• Troubleshooting

See the permissions page for the necessary permission nodes.

Hint

When a parameter (like <player>) is surrounded by [], it means that the parameter is optional. In addition, don’t put < or > when entering the command.

## Gameplay¶

Command Parameters Explanation
/god [-s] [<player>] Give yourself or another player invicinbility. -s can be optionally specified to have no message emitted.
/ungod [-s] [<player>] Remove invicinbility from yourself or another player. -s can be optionally specified to have no message emitted.
/heal [-s] [<player>] Heal yourself or another player. -s can be optionally specified to have no message emitted.
/slay [-s] [<player>] Slay yourself or another player. -s can be optionally specified to have no message emitted.
/locate [<player>] Have your compass point to another player (if specified), or pointed to spawn if no player is specified.
/stack   Organize your inventory and automatically stack items.
/;   An alias for /stack.

### Selectors¶

The commands that take a player name support selectors, but they differ from Minecraft’s selectors which came about 3 years later.

Players can be matched with:

• By default, players are matched if their name starts with the given name
• * to match all
• #<world> to match everyone on a certain world
• #near to match nearby players to the command’s user
• @<name> to match a player’s name exactly

## Regions¶

Command Parameters Explanation
/wg flushstates   Debugging command that clears information about players that is stored for the purpose of applying region flags. For example, for the entry flag to work, the player’s last ‘block’ is stored every time he or she moves, which is used to determine whether the player has entered a region. This command can be useful when a player is stuck inside or outside a region due to the entry or exit flags.

Additional region commands can be found in the regions section.

## Emergency¶

Command Parameters Explanation
/stopfire [<world>] Immediately stop all fire spread on the current or given world.
/allowfire [<world>] Lift the fire spread suspension.
/stoplag [-s] Remove all entities in all worlds and enter a mode where all physics events and liquid flow events are stopped. In addition, when a chunk loads, all entities in that chunk are removed. The purpose of this command is to solve problems involving thousands of entities or items. However, when this command was added, tameable animals were not a thing and the loss of entities was not an issue, but this is no longer the case and this command should be reserved for extremely desperate occasions. -s can be provided to make the toggle not issue an announcement in chat.
/stoplag -c [-s] Disable the ‘stop lag’ mode. -s can be provided to make the toggle not issue an announcement in chat.
/stoplag -i Display the status of the ‘stop lag’ mode.

## Troubleshooting¶

Command Parameters Explanation
/wg report [-p] Writes a report file (placed at plugins/WorldGuard/report.txt) detailing information about the server setup (list of plugins, their versions, world settings) as well as WorldGuard’s configuration. This command is to easily provide information to others for support purposes. The report does not contain sensitive data. Use -p to also submit the report to a pastebin site and have a link generated that you can give to others.
/wg profile [-p] [-t <name>] [<minutes>]

Starts profiling CPU usage of the current running server, and runs the profiler for the given duration (defaulting to 5 minutes if a duration is not specified). The profiler is based on WarmRoast.

By default, results are only collected for the main thread where the world is ‘ticked’, but -t can be specified to filter by a different thread name (case in-sensitive). An asterisk (*) can be specified instead to profile all threads (i.e. -t *).

Use -p to also submit the profiling result to a pastebin site and have a link generated that you can give to others. This is recommended because the output of the profiler is formatted by the pastebin site to make it readable.

/wg debug testbreak [-t] <player> Simulates a ‘block break’ event. This is explained below.
/wg debug testplace [-t] <player> Simulates a ‘block place’ event. This is explained below.
/wg debug testinteract [-t] <player> Simulates a ‘block interact’ event. This is explained below.
/wg debug testdamage [-t] <player> Simulates an ‘entity damage’ event (use to test PvP and PvE). This is explained below.

### Event Simulation¶

The event simulation commands are useful if, for example, players can’t break blocks for some reason and you cannot identify the plugin causing it (without more drastic measures). Use of the /wg debug testbreak command would simulate the block break and record which, if any, plugins chose to block the virtual block break.

In order to use the commands, a player must be provided. The player is the source of the event. The target of the event (i.e. the block that being “broken” or the entity that is being “attacked”), however, is from the perspective of the person running the command. However, if -t is specified, then the target is from the perspective of the source player. The target is whichever block or entity is in the player’s crosshair.

Several plugins may be listed in the output of the command, but only the first entry matters. This is because, for example, if Plugin A blocks the action, and Plugin B, which runs afterwards, “unblocks” the action, then Plugin A has no effect. WorldGuard lists the last running plugins first.

An example

If you want to see why PvP seems to be blocked, have another player (who is not able to PvP) look at you and then run the command:

/wg debug testdamage -t other_player_name


Be aware that the tests are not entirely complete. This is because Bukkit sometimes throws other events for some actions. For example, when filling a bucket, Bukkit fires a bucket fill event, which WorldGuard currently does not provide a way to simulate. Lastly, sometimes Minecraft features (like adventure mode or the built-in spawn protection) may be at play.

Warning

While the events are simulations in that Minecraft won’t place or break the block in question, plugins do act upon the events. For example, a plugin may allow you to right click specially marked signs to teleport, and simulating an interact event on a teleport sign may possibly cause the victim player to be teleported.

## Miscellaneous¶

Command Parameters Explanation
/wg version   Show WorldGuard’s version.