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 215 forks source link

Pre-existing progress not being counted for #942

Closed JustAMatt closed 3 years ago

JustAMatt commented 3 years ago

:information_source: Basic information

:question: Help request

I'm looking for a way to have pre-existing progress to the plugin implementation be accounted for.

Me and my development team are looking into adding this plugin, our server has been l public for 3 Months already, and we would like to keep certain things, such as playtime and JobsReborn accounted for.

Example:

Player A has 10 days of playtime as of now. The plugin when introduced will see Player A as 0 seconds played, if we have an achievement for playing for 7 days Player A will not receive it. He will need to play for 17 days total.

Example for JobsReborn:

Let's say that Player B is Miner level 10 and we add the Plugin with an achievement for Miner level 5. Player B will need to earn 5 more levels and break the Jobs limit to achieve it, since AACH does not count existing levels.

We are looking for a way to have pre-plugin progress counted in if possible.

Thank you in advance! :D

PyvesB commented 3 years ago

Hello @JustAMatt! 👋🏻

For JobsReborn, it may make sense to simply use the player's existing job level rather than just counting level-up events. This would effectively make the JobsReborn category behave like MaxLevel. Any thoughts @n54b ?

Regarding play time, is there actually any way to retrieve that using the Bukkit API?

JustAMatt commented 3 years ago

Hello @JustAMatt! 👋🏻

For JobsReborn, it may make sense to simply use the player's existing job level rather than just counting level-up events. This would effectively make the JobsReborn category behave like MaxLevel. Any thoughts @n54b ?

Regarding play time, is there actually any way to retrieve that using the Bukkit API?

The jobs one is a must, and about player time, I'm not sure, like most servers we use the playtime plugin to get placeholders.

PyvesB commented 3 years ago

We haven't heard back from @n54b , I suggest we go ahead and change it. @JustAMatt would you or someone form your dev team like to submit a pull request? You'll basically need to reproduce the same few lines of code as in the MaxLevel category: https://github.com/PyvesB/advanced-achievements/blob/b7648c0865d41b04f7bfc8370c3eaae7932c01b3/advanced-achievements-plugin/src/main/java/com/hm/achievement/listener/statistics/LevelsListener.java#L36

JustAMatt commented 3 years ago

We managed to replicate for Jobs, but I'm not sure if it'll be possible for playtime.

PyvesB commented 3 years ago

We managed to replicate for Jobs

I'm still unclear whether you intend on contributing this back to the project or not.

ghost commented 3 years ago

I'm sorry I have a lot to deal with in my personal life, so I'm not available at the moment 😥

Ergenta commented 3 years ago

Is this still being looked at? Can this also be made for AdvancementsCompleted as well? This would fall under the same idea of already having achievements full filled but the plugin only counting them after this section was added.

PyvesB commented 3 years ago

Is this still being looked at?

I was wondering the same.

Can this also be made for AdvancementsCompleted as well?

Unfortunately, there's nothing in the Bukkit/Spigot API that provides the total number of advancement completed easily.

PyvesB commented 3 years ago

I've gone ahead and made a last minute change to the way the JobsReborn category works. It's probably duplicated effort given that @JustAMatt also claimed to have made similar changes, and I can't actually test it given that I don't have the JobsReborn plugin currently set up. However, I'm optimistic things will work as expected. It's effectively a breaking change to an achievement category, so it ideally must be part of a major version release - if it had missed imminent version 7.0.0, it would realistically have had to wait several months or years for version 8.0.0.

@BobbyMere @JustAMatt @n54b do let me know if you spot anything wrong when you get a chance to try the new category behaviour. 😉