Skip to content

Add Tool resets for when players lose admin permissions#150

Merged
ScalarVector1 merged 3 commits intoScalarVector1:masterfrom
emyhrberg:ResetToolsForNonAdmins
Dec 2, 2025
Merged

Add Tool resets for when players lose admin permissions#150
ScalarVector1 merged 3 commits intoScalarVector1:masterfrom
emyhrberg:ResetToolsForNonAdmins

Conversation

@emyhrberg
Copy link
Contributor

Description

This PR fixes an exploit where players could enable cheat tools such as Godmode, InfiniteReach, or similar in Singleplayer, then join a Multiplayer server without admin permissions and retain those effects.

Because many tools store active state in static fields, their effects could persist across world transitions unless explicitly reset. This allowed players to bypass admin restrictions.

Summary of Changes

  • Added ResetForNonAdmin(Player) to the Tool base class.
  • Added ResetToolsForNonAdmin(Player) to PermissionHandler, which resets all tool states for non-admin clients.
    Call ResetToolsForNonAdmin:
  • When joining a multiplayer server as a client.
  • When a client loses admin permissions.
  • Updated affected tools (e.g., Godmode, InfiniteReach, etc.) to correctly clear their active state in ResetForNonAdmin.

Demo

This video demonstrates the fix in action.
https://github.com/user-attachments/assets/aa917a43-ad48-44b5-b9fa-424414925173

emyhrberg and others added 3 commits November 29, 2025 02:32
…lose admin permissions.

See PermissionHandler:OnEnterWorld and PermissionHandler:HandlePacket and PermissionHandler:ResetToolsForNonAdmin and files in Content/Tools folder
@ScalarVector1 ScalarVector1 merged commit 434505f into ScalarVector1:master Dec 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments