DeadChest

DeadChest

187k Downloads

World guard region support implementation might need a double check

DavidDoesCode opened this issue ยท 0 comments

commented

By default when world guard region support is enabled there is an odd code path.

First, I believe the way the "highest priority" region is implement is not the way world guard actually works. (More on this later)

Second, almost always the return path is the "return isOp" which skips the error log of "player has no permission"

The issue is, when a region is created it by default blocks chest creation even if no flag is set. If dead chests works in global, they should work in a region with the permissions as null. This is the first issue.

If world guard regions inherited correctly, then setting global flags to true should fix but it doesn't.

And all of this compounds frustration when no error log is made.

(I've made a local commit to fix some of these issues but it's more of a hack then a proper fix - the better fix would be to maybe better determine the permission for the region - for me I always want a dead chest created unless its in a keep-inventory region where I set the dc perms to false. Otherwise it results in dupe)

DavidDoesCode@4310779