Join or teleport into a region with Gamemode group flag does not change it.
LadyCailinBot opened this issue · 3 comments
WORLDGUARD-3661 - Reported by B1acksheep
Following setup:
I have a group "default" and a group "creator".
In my world everyone should have gamemode survival (Realized with Multiverse) and no building rights.
In special regions members of the group Creator should have gamemode Creative and be able to build.
Our implementation
- Global Region: Default
- Creator_spawn:
══════════════ Region Info ══════════════
Region: creator_spawn (type=cuboid, priority=20)
Flags: game-mode -g MEMBERS: CREATIVE
Owners: (none)
Members: *creator
Bounds: (-550,0,-350) -> (400,255,700)
Any names suffixed by * are 'last seen names' and may not be up to date.
Problem
When a player of the Creator group teleports or joins in the 'creator_spawn' region, the Gamemode is not set to Creative.
Comment by wizjany
i assume when you say that when they teleport or join, you are also implying that it DOES work when they simply walk into the region?
in that case, do you have use-player-teleports turned off in your config?
Comment by B1acksheep
Yes, it works if you walk into the region.
But in the config is 'use-player-teleports: true'
(And we run WorldGuard version 6.1.1-SNAPSHOT.1616-c9eaec0)
Comment by wizjany
seems to be working fine for me, with the exception of the case mentioned in WORLDGUARD-3616
teleporting and walking in work fine, and logging into the region works fine as long as i don't already have a cached session in the wrong state.
technically i could force worldguard to drop the cached session when a player re-logs, but that doesn't solve any problems besides the exact one described, which imo is an edge case.
edit: on further thought you might be experiencing a slightly larger edge case if multiverse is also changing the player's gamemode upon login, for which there is even less we can do (i.e. forcing wg to drop the cached session won't work) since we would be fighting for timing with multiverse.
edit2: this also just occurred to me, but if by "teleport into the region" you mean "teleport from another world", then you are likely once again hitting the case where multiverse is setting their gamemode and overriding worldguard. this should not be an issue if they are teleporting into the region from the same world.