A fork of GriefPrevention that adds 3D subdivisions
GriefPrevention3D v18.4.6
Wiki: https://github.com/castledking/GriefPrevention3D/wiki
Overview
%gp3d_trust_level% and %gp3d_is_trusted% now update live in TAB and other plugins that refresh placeholders in the
background. Before, a scoreboard kept showing the trust level from when the player walked into the claim. Toggling
/ignoreclaims or being trusted and untrusted while standing still changed nothing until they walked out and back in.
/trustlist on a subdivision also stops hiding players whose inherited trust is only partly blocked by a deny entry.
Trust placeholders
Why it happened
To work out a player's trust level, the expansion called Claim.checkPermission, which fires
ClaimPermissionCheckEvent. Paper only allows that event on the main server thread. TAB and similar plugins refresh
placeholders on their own thread, so every background refresh threw an error and the plugin kept the last value it had
read successfully. That value usually came from when the board was first built.
/papi parse runs on the main thread, so it always showed the right answer, which made the problem look like a
scoreboard configuration mistake.
The fix
Claim gains hasDefaultPermission(Player, ClaimPermission). It runs the same default trust rules as
checkPermission without firing the event:
- claim owner
/ignoreclaimswith the bypass permission- admin claims and admin subdivisions
- explicit trust, including permission-node trust
- public trust
- subdivision inheritance and deny entries
The placeholders use it, so they are safe to read from any thread. Real permission checks in the game still fire the event exactly as before.
Because the event is no longer fired for placeholders, plugins that listen to it (GPFlags, for example) no longer change what the placeholder displays. They still control the actual permission check.
/trustlist and partly denied inheritance
A subdivision inherits its parent claim's trust unless a deny entry blocks it. A deny for one level, such as #build,
only blocks that level. A player who is a builder on the parent and denied #build in the subdivision still has
container trust there, and %gp3d_trust_level% correctly reports Container.
/trustlist grouped inherited entries by their level on the parent and dropped anyone denied that level. So that player
vanished from the list completely, and it looked as though they had no trust in the subdivision at all.
Denied inherited entries now move down to the highest level they still hold:
| Parent trust | Denied in subdivision | Listed as |
|---|---|---|
| Builder | #build |
Container |
| Builder | #build and #container |
Access |
| Container | #container |
Access |
An entry leaves the list only when every level it could inherit is denied.
Upgrade notes
No configuration or storage changes. Drop-in replacement for v18.4.5.