Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

Changes to PlayerData, NetItem, TSPlayer and hooks #2940

Closed AgaSpace closed 1 year ago

AgaSpace commented 1 year ago
sgkoishi commented 1 year ago

Plugins that use TSPlayer.DamagePlayer or KillPlayer requires recompile (source level compatible). Plugins that use TShockAPI.Hooks.PlayerHooks.OnPlayerCommand requires change.

AgaSpace commented 1 year ago
  • The OnAccountGroupChange hook should be invoked in UserManager.SetUserGroup instead, right now it only fires when a group gets changed via command
  • The PlayerCommand hook should probably be kept and called like it was before for binary backwards compatibility
  • The UpdateSection method's visibility parameter should be called something like isLoaded instead to not be misleading, and the documentation adjusted
  • The DamagePlayer and KillPlayer reason parameters should also be put into an overload instead for binary backwards compatibility

I wrote it down as you instructed

AgaSpace commented 1 year ago

@punchready, Any other changes needed for the merge?

AgaSpace commented 1 year ago

Since I have been asked to split this PR into several smaller PRs, I am closing this PR.