PyvesB / advanced-achievements

:fireworks: Popular plugin that adds unique and challenging achievements to Minecraft servers.
https://www.spigotmc.org/resources/83466
GNU General Public License v3.0
199 stars 214 forks source link

Please add support for offline player #973

Closed CloudeLecaw closed 3 years ago

CloudeLecaw commented 3 years ago

/aach add amount cat player at the moment its a requiement the player has to be online.

we have a votecounter

It happens often that a player votes for the server while he is offline. Currenty he does not get his vote counted that way even if the command is executed correct.. the result is just "the player is not online"

So could you add support for adding amount in a cat to a player? maybe just by UUID if not possible by playername? :3

player is online: image all fine... . player is offfline image the stats of the player is not increased :-(

PyvesB commented 3 years ago

Hello @CloudeLecaw ! :wave:

As you've noted, the /aach add command does not work for offline players. Trying to increase the counter offline would no do what you would expect. By design, checking thresholds and awarding achievements only happens at the point when a given statistic is increased. If the player is offline, the achievement will not be awarded, and player's progress will end up in an inconsistent state, for example progress bars in the GUI showing 13/10 and the achievement still not being received. The other problem that you've highlighted is that player names would not work, as they are no longer unique past a single game session.

I don't know how your vote counter works, but calling aach add only after when the player joined the server would solve the problem. 😉

CloudeLecaw commented 3 years ago

Could u tell ne how i give a reward/command only after the player joins? This would need sime kind like a storeage.. that a vote was done.

PyvesB commented 3 years ago

Yes, some kind of storage would do the trick. Alternatively, you can increase the statistic in Advanced Achievement's database directly, and then force the statistic synchronisation on player join by running /aach add 0 Custom.votes PLAYER.

CloudeLecaw commented 3 years ago

how to force the increase of the Adanced Achivments database statisic diectly by command?

PyvesB commented 3 years ago

how to force the increase of the Adanced Achivments database statisic diectly by command?

As indicated previously, you cannot do this via command. You would need to write to the database or integrate with the API to do that.

CloudeLecaw commented 3 years ago

The normal user now works with api outch So the answer is its not possible for the normal user. Ok