CraftIRC / 3

CraftIRC3
19 stars 35 forks source link

Change Achievements to Advancements / Fix 1.15 support #68

Open jacob1 opened 7 years ago

jacob1 commented 7 years ago

I know this plugin is dead but ... I still use it so I updated it to relay 1.12 advancements

merge if you want, otherwise maybe someone will find it useful.

Edit: Updated to remove achievement support entirely. 1.15 Bukkit removed that api finally. If anyone needs a new version for 1.15, I compiled it here: https://starcatcher.us/Moo/CraftIRC.jar This is perhaps the most important plugin on my server, since I'm always on IRC and want to talk to the members, and know when I should get online.

dequis commented 7 years ago

Wow, was that really the whole API break? Some pointless renames and .getKey().getKey() instead of .name()? Impressive.

I'd suggest not renaming every instance of achievement to advancement. Event type, formats, attributes, hold type, all that stuff doesn't need renaming.

A way to keep backwards compat would be nice.

jacob1 commented 7 years ago

The Advancements api seems to support more stuff (since advancements themselves support more things than achievements). But it is pretty much the same to get the name. The names are different now, before it would be "BREW_POTION", it is now "nether/brew_potion" (might be nice to prettify the names into the in game versions...). Achievements didn't seem to get reported through the old api anymore which is why I did this.

I guess I can check if backwards compatibility is possible. I'm not too experienced in this though.I renamed everything because I wasn't supporting old achievements anyway. The config file key probably shouldn't have been renamed.

jacob1 commented 7 years ago

Backwards compatibility added, I tested 1.12-pre5 and 1.11.2, it relayed them in both cases

jacob1 commented 7 years ago

Apparently it notifies using the advancements API on every recipe that is unlocked, or something. I will have to fix that, it's extremely spammy.

jacob1 commented 7 years ago

massive spam removed. I think it's fine and ready to merge now.

Chinimala commented 7 years ago

Will you give the new .jar with these changes ?

jacob1 commented 7 years ago

https://mc.starcatcher.us/CraftIRC.jar

Chinimala commented 7 years ago

Thank you very much

jacob1 commented 7 years ago

I removed the deprecation warning on server startup, and tested 1.12 / 1.11.2 again, it all works fine.

jacob1 commented 4 years ago

Backwards compat turned out to be a bad idea. The old achievements api was removed in 1.15. I changed it back to only supporting advancements, this should handle anyone in 1.12+. Anyone for some reason still on an older version can just use an old version of the plugin from 3 years ago.

If anyone wants this plugin for 1.15 on their server, compile this PR, or use the jar file I compiled here: https://starcatcher.us/Moo/CraftIRC.jar