Minepacks

Minepacks

2M Downloads

Dupe glitch

ItzRobin opened this issue · 2 comments

commented

Information

Environment information
Plugin + server version info:


<!-- [19:15:15 INFO]: ##### Start Minepacks version info #####
[19:15:15 INFO]: Minepacks: 2.4.5.1-Release
[19:15:15 INFO]: Server: git-Paper-278 (MC: 1.18.2)
[19:15:15 INFO]: Java: 17.0.2
[19:15:15 INFO]: #####  End Minepacks version info  ##### -->

Online mode:

BungeeCord:

Server/crash log


<!-- Replace this with your crash log / link to your log file -->

Plugin config (optional)


https://gist.github.com/ItzRobin/5ddddb0eb97100fb9e5619a19e38095c

Details

Description
It seems that there is a dupe glitch with this plugin for our server. Some players take stuff out of their inventory just before the daily restart and sometimes find it back in both their vanilla inventory AND in their backpack. Before a crash we also see this because the vanilla inventory and backpack of this plugin are not saved synchronously (i.e. at the same time). Players abuse this on our server and therefore the plugin has become unusable for us. In addition, there was a player today whose backpack would have had a one-day setback.

Steps to reproduce
Please see description

Expected behavior
When you remove something from the backpack, you should not be able to find it again in your backpack.

Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)
Replace this with any additional information, if necessary.

commented

Just to make sure, you are shutting down your server properly with /stop?
Because the shutdown order is:

  • Unloading plugins
    • Unload Minepacks
      • Disable command
      • Close all backpacks
      • Save all backpacks
      • End plugin
  • Save players
  • Save world

so, the players will not be able to take anything out of the backpack after the data has been saved. If you can show me how to do this, i might be able to figure out what's causing the issue for you, but I have been using this plugin for 8 years now and not once had an issue with items reapearing after a restart.

Regarding desync after a crash. I hope that your server is not crashing regularly, but a crash will most likely cause way more desyncs than just the backpack (like for example item shops, ...).

Unless there is something seriously wrong which would show up in the logs, there is no way that a single player's backpack got a one-day setback.

commented

Yes, we use /restart but the effects are the same I guess. I see that the plugin disables after the players are kicked and I see nothing special in the logs. No errors in old logs regarding this plugin either.

Unfortunately, our server has crashed quite often recently due to a memory leak, which we have fortunately been able to solve. I can imagine that a desync is unavoidable and indeed, maybe not our biggest concern.

Anyway, this is what I find in the logs of this morning, I don't see steps like close backpacks, and save backpacks but I assume these steps are between "shutdown initiated" and "shutdown completed":

[04:19:14] [Server thread/INFO]: [Minepacks] Disabling Minepacks v2.4.6.1-Release
[04:19:15] [Server thread/INFO]: [at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.HikariDataSource] Minepacks-Connection-Pool - Shutdown initiated...
[04:19:15] [Server thread/INFO]: [at.pcgamingfreaks.MinepacksStandalone.libs.com.zaxxer.hikari.HikariDataSource] Minepacks-Connection-Pool - Shutdown completed.
[04:19:15] [Server thread/INFO]: [Minepacks] �[31m Minepacks has been disabled. �[33m :( �[0m

Maybe we should wait and see, if it happens again (let's hope not) I will investigate this further. Thank you very much for your quick response! Lets close the ticket for now :)