Duels icon indicating copy to clipboard operation
Duels copied to clipboard

Players losing inventory items on server restart

Open moo-im-a-cow opened this issue 7 years ago • 3 comments

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.

moo-im-a-cow avatar Jan 17 '19 09:01 moo-im-a-cow

It already does that. Are you sure that everything is shutting down properly? No errors or anything?

Realizedd avatar Jan 17 '19 18:01 Realizedd

@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.

ygtdmn avatar May 14 '19 10:05 ygtdmn

same issue here. players lose their items if they are in a duel while the server restarts

MedicOP avatar Aug 06 '19 00:08 MedicOP