Skip to content

Gamemode flags resolve incorrectly on teleport when moving out of nested regions #2264

@BriteBytes

Description

@BriteBytes

WorldEdit Version

7.3.18

WorldGuard Version

7.0.15

Platform Version

purpur-1.21.11-2566.jar

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using a version of WorldGuard compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

If a player is inside a higher-priority region (gamemode set to survival) nested within a lower-priority region (gamemode set to creative) and teleports directly outside both regions, WorldGuard applies the outer region’s gamemode (creative) instead of reverting to the world’s default.

This only occurs when teleporting; walking between regions resolves gamemodes correctly.

Expected Behavior

If the destination is not within any region with a gamemode flag, the player should revert to the world’s default gamemode.

Reproduction Steps

  1. Set the world’s default gamemode to Survival
  2. Create a region inner with:
    • gamemode = survival
    • priority = 2
  3. Create a region outer that fully contains inner, with:
    • gamemode = creative
    • priority = 1
  4. Stand inside inner
  5. Teleport to a location outside both regions
  6. You'll now incorrectly be in Creative mode

Optional WorldGuard-Report

No response

Anything Else?

Note that this bug can also be reproduced on the latest beta release of WorldGuard.
This report is from a Purpur server, but also can be reproduced on the latest Paper and Spigot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:pendingPending acceptance or closure.type:bugIncorrect behavior, not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions