Pryaxis / TShock

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

ServerAPI.Hooks.ServerLeave Never fires. #2948

Open Zulvex opened 1 year ago

Zulvex commented 1 year ago

Issue: I have been making some plugins for TShock, and I noticed there wasn't a leave message, so I tried adding one, and the event: ServerAPI.Hooks.ServerLeave never fires. I decided to look into the TShock plugin code and there is a leave message that also never displays. I have tried just printing a general console message ignoring the args and it still never displays on a player disconnecting. But the world save still happens on player disconnect so I'm not sure if other code is saving the world on disconnect or what because I can never get the event to fire.

Reproduction steps (if applicable)?

Leave the game, and the leave message never displays nor does the event even fire.

My usage: ServerApi.Hooks.ServerLeave.Register(this, OnPlayerLeave); and private void OnPlayerLeave(LeaveEventArgs args) { Console.WriteLine("OnPlayerLeave Activated!"); }

Arthri commented 1 year ago

Is your server running on x32/x86/ARM32?

Zulvex commented 1 year ago

Oh sorry forgot to add that stuff, running it on Linux fedora ARM64

PotatoCider commented 1 month ago

Is this bug still reproducible? I am unable to reproduce this bug on aarch64 (debian 11 bullseye, rpi) with latest dotnet sdk v6.0.423, TShock v5.2.0 release.

image