Realizedd / Duels

A duel plugin for minecraft.
https://www.spigotmc.org/resources/duels.20171/
GNU General Public License v3.0
108 stars 100 forks source link

Players losing inventory items on server restart #12

Closed moo-im-a-cow closed 1 year ago

moo-im-a-cow commented 5 years ago

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.

Realizedd commented 5 years ago

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

ygtdmn commented 5 years ago

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

MedicOP commented 5 years ago

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