You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spectators should be excluded, or at least have different logic. Currently, things that spectators can see get obscured when clipping through blocks underground. Maybe this could be a config option?
The text was updated successfully, but these errors were encountered:
Thank's for your suggestion. RayTraceAntiXray makes use of Paper's built-in Anti-Xray, which already has a bypass permission. Using a permission plugin like LuckPerms you can assign permissions to players based on their gamemode context.
However, this solution doesn't work if you want to switch dynamically between gamemodes while being in the world. In order for the changes to take effect, you would have to reload (i.e. refresh or resend) all chunks that the player has currently loaded after switching between gamemodes. (Note that the linked project is outdated and won't work anymore.)
What I could implement in RayTraceAntiXray
The thing is, in your use case, you don't actually care about blocks that aren't exposed to air, I guess? You only want to reveal the blocks that you can possibly see as spectator. Those are exactly the blocks that are ray traced by RayTraceAntiXray. I can add a bypass for those blocks by just treating them as "seen by the player".
However, I wouldn't implement the bypass based on the player's gamemode, but more general using a permission (similar to the Anti-Xray bypass permission) that you can enable in the config. You can then still bind it to a gamemode using a permission plugin as explained above.
Spectators should be excluded, or at least have different logic. Currently, things that spectators can see get obscured when clipping through blocks underground. Maybe this could be a config option?
The text was updated successfully, but these errors were encountered: