Closed moo-im-a-cow closed 1 year ago
It already does that. Are you sure that everything is shutting down properly? No errors or anything?
@Realizedd i have the same issue right now. But the solution is not that.
If a player is quitting the game in the middle of a duel and won't login to server until a server restart, their inventory will not be restored. If you can keep player inventories in a database to make them persistent and give items to player when they join server, this problem will be gone. Only keep inventories of players who is not in game (quitted in the middle of duel) to avoid unnecessary database calls.
same issue here. players lose their items if they are in a duel while the server restarts
If players are in a duel, and the server restarts or stops, the duels plugin doesnt restore their inventory. (proper restart via any method - /stop, panel stop/restart button, automatic restart, excluding crashes)
a solution would be (in onDisable), loop over all the currently running duels, and end them, the duel would be counted as a tie (or not counted at all), and players would have their inventory restored.