StrangeLoopGames / EcoModKit

Eco Modkit
https://docs.play.eco
69 stars 25 forks source link

Add Admin added/removed or Permissions changed event on UserManager #41

Closed nidaren closed 1 year ago

nidaren commented 2 years ago

Is your feature request related to a problem? Please describe. Nope.

Describe the solution you'd like

Adding an event alongside existing:

public static ThreadSafeAction<User> OnUserLoggedIn  = new ThreadSafeAction<User>();
public static ThreadSafeAction<User> OnNewUserJoined = new ThreadSafeAction<User>();
public static ThreadSafeAction<User> OnUserLoggedOut = new ThreadSafeAction<User>();
public static ThreadSafeAction<User> OnUserInit      = new ThreadSafeAction<User>();`

that would either trigger when Admin is added and removed.

public static ThreadSafeAction<User> OnAdminStatusChanged  = new ThreadSafeAction<User>();

Describe alternatives you've considered

None for this one.

Additional context

It would allow modders to trigger their actions when user status has been changed, without the need to listen for ChatSent and filtering commands from it or using reflection.