mobarena / MobArenaStats

An extension plugin for MobArena that collects arena session stats.
GNU General Public License v3.0
3 stars 2 forks source link

MAStats cannot save stats because Class is null #16

Closed Delanooootje closed 2 years ago

Delanooootje commented 2 years ago

My players are joining to arenas from world "Lobby" through NPC. They can play and everything works fine. When player die, plugin respawn him in world "Lobby" on position from where he joined the arena. (spectator is disabled for arenas and exit warp not set) When last player in arena die, it throws error into console and don't save stats.

Config: https://pastebin.com/bYxwF3jz MobArena version: build #34 from Github Actions MobArenaStats version: build #6 from Github Actions

Server version: Paper 1.17.1 build 257 Plugins: obrázok_2021-10-07_201019

What I tried:

garbagemule commented 2 years ago

Sorry for the late response here. The error claims that the player's class is null, which shouldn't actually be possible. Do you have any concrete reproduction steps for this issue, or does it just happen "all the time"? If you don't have any issues, please try the following with two players, A and B:

Ghmmy commented 2 years ago

The error seems to be related to the auto-start-timer.

Upon joining the arena (with auto-ready set to true and an auto-start-timer set to any time) and not readying up (either /ma ready or clicking the iron block), the console will be presented by the null error after the session has ended (any reason: left, died or completed). Upon joining the same arena and readying up using the command (/ma ready) or clicking the iron block, this error will not be presented upon ending the session.

Our errors are similar, but yet different in some aspects. See if disabling the auto-ready feature and/or manually ready up to see if that solved your error as well.

Nesseley commented 2 years ago

I also just managed to get an error and the stats not saving.

Error: https://pastebin.com/AbXEmw3Q looks like the same error Ghummy had? Config: https://pastebin.com/tEbqh5y5 I am using the auto-start timer, but I am pretty sure that we did ready up using the iron block.

Edit: So, I had a suspicion that the error came because I joined with a third user in the lobby-phase, and that user used /ma l again before we started the arena. I did another test with my friend playing, me joining and leaving. And my friend then played the full arena. Error: https://pastebin.com/scXEu9T0

I tested again playing alone with no-one leaving and it saved just fine.

There might be a problem that when a user leaves the lobby it doesn't save as they had no class.