MobHunting

MobHunting

114k Downloads

Achievements stopped working (for one player only)

vilgrar opened this issue · 3 comments

commented

Hi,

A player of mine reported that all his achievements disappeared and he can no longer start new ones. I checked the database and all the info's there. I did a debug and found something strange:

[21:05:04 INFO]: [MobHunting][Debug] ======================== New kill =========

[21:05:04 INFO]: [MobHunting][Debug] Tubus killed a Horse (Minecraft)
[21:05:04 INFO]: [MobHunting][Debug] Permission 'mobhunting.mobs.*' or 'mobhunti
ng.mobs.HORSE' not set, defaulting to True.
[21:05:04 INFO]: [MobHunting][Debug] Basic Prize=Ç1 for killing a Horse
[21:05:04 INFO]: [MobHunting][Debug] Checking if player is grinding within a ran
ge of 15.0 blocks
[21:05:04 INFO]: [MobHunting][Debug] DampendKills=3
[21:05:04 INFO]: [MobHunting][Debug] Multiplier: Sneaky! = 2.0
[21:05:04 INFO]: [MobHunting][Debug] Killstreak=8, level=1, multiplier=1.5
[21:05:04 INFO]: [MobHunting][Debug] [AchievementBlocked] Achievements is disabl
ed for player Tubus
[21:05:04 INFO]: [MobHunting][Debug] [AchievementBlocked] Achievements is disabl
ed for player Tubus
[21:05:04 INFO]: [MobHunting][Debug] RecordKill: Tubus killed a Horse (Minecraft
) Cash=Ç3
[21:05:04 INFO]: [MobHunting][Debug] Tubus got a reward (Ç3)
[21:05:04 INFO]: [MobHunting][Debug] If 0.9015874044564866<0.01 Tubus will get a
McMMO Level for Swords
[21:05:04 INFO]: [MobHunting][Debug] Command will be run if chance: 0.05 > 0.384
4087357773902 (random number)
[21:05:04 INFO]: [MobHunting][Debug] ======================= kill ended (37)====

He's a regular player with no advantages such as /god or /gm 1. I can't figure out why he, and only he, is blocked.

commented

Very strange, when the player is a regular his achievements might be in the cache. I dont understand why they would be disabled, but I have added a test, onPlayerLogin, and enable Achievements if they are disabled. And you will see a debug messages, if this is the case.

Please test build 407 https://fractal.lindegaard.one:8181/job/MobHunting/

And let me see the debug information when the player login, if the bug persists.

commented

My player reports that his achievements are back! =)

Here's the debug info:
[11:35:24] [Thread-37/INFO]: [MobHunting][Debug] Reading Playersettings from Database: PlayerStore: {player: Id:80 Name:Tubus, Learning Mode: false, Mute Mode: false}�[m

[11:35:24] [Server thread/INFO]: Tubus[/213.114.130.137:61443] logged in with entity id 1658458 at ([world]3562.1486778355443, 68.0, -11049.24926386247)
[11:35:24] [Thread-37/INFO]: �[0;32;22m[�[0;32;1m+�[0;32;22m] �[0;33;22mTubus�[m

[11:35:24] [Thread-37/INFO]: [MobHunting][Debug] Loading Tubus's Achievements�[m

[11:35:24] [Thread-37/INFO]: [MobHunting][Debug] Loaded 67 Achievements.�[m

[11:35:24] [Thread-37/INFO]: [MobHunting][Debug] Error in mh_Achievements: hunting-level3-chicken=478. Changing status to completed. �[m

commented

Perfect.

But I dont like this one:

[11:35:24] [Thread-37/INFO]: [MobHunting][Debug] Error in mh_Achievements: hunting-level3-chicken=478. Changing status to completed. �[m

It looks like a bug we have not found yet. Like if a player get an achievement but the data was not saved. In this case (the player killed 500 chicken and started next level - but still it says 478, where it should be -1 for completed).... Im pretty sure I have a bug somewhere, this should not happen.