BentoBoxWorld / AOneBlock

A OneBlock Minecraft Game for BentoBox
https://docs.bentobox.world
Eclipse Public License 2.0
77 stars 29 forks source link

Phase block count random rollback on next login #127

Closed dig closed 3 years ago

dig commented 4 years ago

Description

Describe the bug

Players block count sometimes randomly rollbacks when they next login.

Steps to reproduce the behavior

N/A

Expected behavior

Players should log back in with the correct block count and phase.

Screenshots and videos (Optional)

N/A

Environment

Output of /bbox version (Mandatory)
[10:59:28 INFO]: Running Invalid (YATOPIA) 1.16.3
[10:59:28 INFO]: BentoBox version: 1.15.1
[10:59:28 INFO]: Database: MARIADB
[10:59:28 INFO]: Loaded Game Worlds:
[10:59:28 INFO]: oneblock_world (OneBlock): Overworld, Nether
[10:59:28 INFO]: Loaded Addons:
[10:59:28 INFO]: AOneBlock 1.4.2 (ENABLED)
[10:59:28 INFO]: Border 2.0.0 (ENABLED)
[10:59:28 INFO]: Warps 1.10.0 (ENABLED)

Plugins (Optional)

Plugins (63): AdvancedPortals, AuctionHouse, AutoClicker, BentoBox, boosCooldowns, Boss, BuycraftX, ChatControl, Citizens, ClueScrolls, CombatLogX, CrateReloaded, DeluxeMenus, DeluxeTags*, EliteEnchantments, EnderVaults, EntityTrackerFixer, Envoys, Essentials, EssentialsSpawn, FixBlueIce, FKeyInteraction, Generators, HeadDatabase*, HolographicDisplays, IllegalStack, Images, InteractiveBooks, InteractiveChat, JetsAntiAFKPro, KOTH*, LeaderHeadsRevamped, LuckPerms, mcMMO, MightyDeathPenalty, MineableSpawners, MoreFish, NoFlyZone, OBPunch*, PacketLimiter, PlaceholderAPI, ProtocolLib, Quests, QuickShop, RankBroadcasts*, SafariNet, ShopGUIPlus, ShuffleShop, SuperTrailsPro*, TAB, TempFly, TokenManager, TradeSystem, UltimateAutoRestart, Vault, ViaBackwards, ViaRewind, ViaVersion, VoteParty, Votifier, WorldEdit, WorldGuard, WorldGuardExtraFlags

Additional context (Optional)

dig commented 4 years ago

@tastybento any idea on why this is occuring?

tastybento commented 4 years ago

Likely related to #129. The block counts were not being saved except on server shutdown and so if the server was killed then the data was not saved. It's now saved on logout and other times, so this should not happen. Other than that, I cannot see a code path where this would happen.

dig commented 4 years ago

Our players have been roll backed multiple phases when they next login. The solution from #129 should not fix this issue. On BlockListener line 234 to line 238, you save the island whenever the player enters a new phase, this would prevent players going back multiple phases if the server were to crash but this issue still occurs. I am certain the issue has something to do with island loading or saving to data storage, not when the island gets saved.

hvrry commented 4 years ago

Can confirm this ^

tastybento commented 4 years ago

@dig @hvrry What versions of AOneBlock are you running where you see this happen? Are you on the latest snapshot?

dig commented 4 years ago

@dig @hvrry What versions of AOneBlock are you running where you see this happen? Are you on the latest snapshot?

No, we're running v1.4.2. The latest snapshot should not fix our issue but we will try it on the server.

dig commented 4 years ago

@tastybento Latest version still has the issue, players are experiencing block count rollbacks when they next login.

tastybento commented 4 years ago

Okay, some clarifying questions:

  1. Does this always happen, with every player? Or just randomly?
  2. Can you replicate it? If so, how?
  3. Do you restart the server between them logging out and back in?
  4. Are the players who have this issue playing in teams?
  5. Can you export and share your database so I can try to replicate?
dig commented 4 years ago

@tastybento

  1. Randomly
  2. No, we cannot find how players are causing it.
  3. Our server auto restarts once a day so this could be a factor.
  4. Mixture of teams and solo players.
  5. Yes, can you contact me privately on discord? Digital#4937
ghost commented 3 years ago

I currently have the same problem

tastybento commented 3 years ago

This was traced down to an admin command being used on the server somehow. So I'm surprised to hear that @DentrayYT. Can you share more info?