WorldGuard Documentation

repository·version/7.0.x·Indexed 21 days ago

https://github.com/enginehub/worldguard

A Minecraft server plugin for protecting land areas from griefing and managing gameplay mechanics. Requires a Bukkit server implementation (such as Paper) and the WorldEdit plugin. Features include region management via /rg and /region commands, granular control over block events, and administrative tools for player health, god mode, and inventory stacking.

Tokens
5.6K
Snippets
46
Records
48
Agent score
70%

What's inside WorldGuard

  1. Install and use WorldGuard

    version/7.0.x

    WorldGuard is a plugin used to protect land areas from griefing and to manage Minecraft gameplay features (e.g., disabling fire spread, blocking specific items, or protecting regions from TNT/PVP).

    To use WorldGuard, you must have the following dependencies installed on your server:

    1. A Bukkit server implementation (such as Paper).
    2. The WorldEdit plugin.
  2. Generate IDE project files for WorldGuard

    version/7.0.x

    If you are developing on WorldGuard, you can generate project files for your preferred IDE using the following Gradle commands:

    • IntelliJ IDEA: Generates a module for each folder in the multi-module project.
    • Eclipse: Generates an Eclipse project for each folder in the multi-module project.
    ./gradlew idea
    # OR
    ./gradlew eclipse
  3. Compile WorldGuard using Gradle

    version/7.0.x

    WorldGuard uses Gradle for its build process. You do not need to install Gradle manually, as the project includes the gradlew wrapper.

    Prerequisites:

    • A version of Java greater than or equal to 25 must be installed to bootstrap the process. Gradle will automatically download JDK 25 if it is not present.

    Build Commands:

    On Windows (PowerShell):

    ./gradlew build

    On Linux, BSD, or Mac OS X:

    ./gradlew build
  4. Locate compiled WorldGuard artifacts

    version/7.0.x

    After running the build command, the compiled artifacts are located in the build/libs directory of their respective modules.

    When using the artifacts, prefer the versions suffixed with -dist, as these include WorldGuard along with all necessary libraries.

    Artifact Locations:

    • WorldGuard API: worldguard-core/build/libs
    • WorldGuard for Bukkit: worldguard-bukkit/build/libs
  5. Simulate a block place event

    version/7.0.x

    Use the firePlaceEvent command (or its alias testplace) to simulate a block placement event for a specific player. This is used for debugging WorldGuard's event handling.

    Usage: [player] Permissions: worldguard.debug.event Flags:

    • -t
    • -s
    / No direct CLI invocation example provided in source, but usage pattern is:
    / [command] [player] [-t] [-s]
  6. Remove owners from a region

    version/7.0.x

    Use this command to remove specific owners from a region, or remove all owners at once.

    Usage: <id> <owners...>

    Flags:

    • -a: Remove ALL owners from the region.
    • -n: Use name-only locator policy.
    • -w <world>: Specify the world where the region exists.

    Note: If you do not use the -a flag, you must provide at least one owner name/UUID to remove.

    Aliases: removeowner, remowner, ro

    removeowner <id> <owners...> [-a] [-n] [-w <world>]
  7. Generate a WorldGuard report

    version/7.0.x

    Use the /wg report command to generate a diagnostic report containing system information, configuration details, and (if run by a local player) applicable regions. The report is written to report.txt in the WorldGuard configuration directory.

    Flags:

    • -p: If you have the worldguard.report.pastebin permission, this flag will also upload the report to Pastebin.
    /wg report
    /wg report -p
  8. Halt intensive server activity to stop lag

    version/7.0.x

    The /halt-activity command attempts to reduce server lag by removing all 'intensive' entities (such as animals) across all loaded chunks and worlds.

    WARNING: This action is PERMANENT. It will erase all animals in all loaded chunks in all loaded worlds.

    Usage: /halt-activity [confirm] Permissions: worldguard.halt-activity Aliases: halt-activity, stoplag, haltactivity

    Flags:

    • -i (intensive): Checks the current status of the activity halt toggle.
    • -c (confirm): Skips the confirmation prompt (use with extreme caution).
    • -s (silent): Performs the action without broadcasting a notification to the server.

    To execute the command safely, you must either click the confirmation message provided in chat or type /halt-activity confirm.

    # To see current status
    /halt-activity -i
    
    # To trigger the confirmation prompt
    /halt-activity
    
    # To confirm immediately (Dangerous)
    /halt-activity confirm
    
    # To trigger silently
    /halt-activity -s confirm