What's the difference between OnPlayerBanned and OnUserBanned?

Looking at the docs I can see that OnPlayerBanned uses:

OnPlayerBanned(string name, ulong id, string address, string reason)


While OnUserBanned uses:

OnUserBanned(string name, string id, string ipAddress, string reason)

 

Aside from the type difference for the `id` are there any other differences in these hooks? e.g. when they are called.

Thanks.

OnUserBanned

  • Called when a player has been banned from the server
OnPlayerBanned
  • Called when the player is banned (Facepunch, EAC, server ban, etc.)


Use OnUserBanned if you want to take care only for server ban.

Use OnPlayerBanned if you want to take care probably for all types.