ArcanePlugins / Treasury

🏦 A powerful multi-platform library for next-level plugin integrations.
https://hangar.papermc.io/ArcanePlugins/Treasury
Other
55 stars 14 forks source link

Add MiniPlaceholders support #277

Closed MrIvanPlays closed 1 year ago

MrIvanPlays commented 1 year ago

This will be released in Treasury whenever ready.

The idea: extract as much code from the bukkit module from the PlaceholderAPI hook as possible into the core module and make platform independent placeholder parse code, which is to be used in a PlaceholderAPI expansion and MiniPlaceholders expansion.

Thoughts on how to realize this in the most cleanest way possible WANTED!

MrIvanPlays commented 1 year ago

We dont need javadoc in treasury plugin internal classes, will add such when needed/confusing. @lokka30

MrIvanPlays commented 1 year ago

The current code works completely fine (with even the most basic PoS provider I wrote), which means we can proceed onto implementing MiniPlaceholders.

img

MrIvanPlays commented 1 year ago

Just finished implementing MiniPlaceholders on Bukkit - will push right now, however, anyone having any idea why this PoS started coming up?? image

EDIT: Results from parse using MiniPlaceholders' command: image2

montlikadani commented 1 year ago

@MrIvanPlays You basically need to cancel the async task when disabling the plugin which is running still in the background, it is coming from Scheduler class

MrIvanPlays commented 1 year ago

Couldn't be bothered to add permissions plugins to Velocity, but here it is - MiniPlaceholders working on velocity: image

MrIvanPlays commented 1 year ago

@MrIvanPlays You basically need to cancel the async task when disabling the plugin which is running still in the background, it is coming from Scheduler class

@montlikadani I've implemented such system (and is committed, can see) to cancel the tasks in bukkit too, however the nag is still printed. Could you please check?

MrIvanPlays commented 1 year ago

MiniPlaceholders now work on Sponge too: image

MrIvanPlays commented 1 year ago

I think this is ready for reviews - only issue is the async tasks nag.

montlikadani commented 1 year ago

@MrIvanPlays You basically need to cancel the async task when disabling the plugin which is running still in the background, it is coming from Scheduler class

@montlikadani I've implemented such system (and is committed, can see) to cancel the tasks in bukkit too, however the nag is still printed. Could you please check?

Its hard for me to analyze which scheduler is still alive in the background, to easily debug this print all the running workers using Server#getScheduler#getActiveWorkers method when disabling the plugin and you could fix it.