WorldGuard

WorldGuard

8M Downloads

Some operations in PlayerDomain/GroupDomain do not setDirty(true) so that updates are forgotten on server restart

LadyCailinBot opened this issue ยท 2 comments

commented

WORLDGUARD-3404 - Reported by Brokkonaut

In PlayerDomain the methods are:
removePlayer(UUID uuid) and clear() .

In GroupDomain the method is:
clear()

This is a major issue, because after a server restart players may have permissions in a region where they should not have any permission.

commented

Comment by wizjany

While this may be an issue...worldguard saves everything regardless of dirtyness when the server stops. The only time changes will be lost is if the server crashes.

commented

Comment by Brokkonaut

It does saveChanges() on server shutdown ( https://github.com/sk89q/worldguard/blob/master/src/main/java/com/sk89q/worldguard/protection/managers/RegionContainerImpl.java#L177 ) and saveChanges() relies on ProtectedRegion.isDirty().

How to test:

  1. Have a server with a region with some player added as member
  2. Restart the server (to be sure to have no pending changes)
  3. Do /rg removemember -a regionname
  4. Restart the server
  5. The player is member of the region again..