Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
This is a complete rewrite of the Tebex-PMMP plugin, aiming bug fixes, improvements and easing ways to add features in the future.
What's New
worker-limit
inconfig.yml
, default:2
)./buy
now supports two types of GUIs -inventory
andform
. The default GUI type isinventory
but this can be configured (categories-gui-type
inconfig.yml
)./tebex secret <secret>
will voluntarily block the main thread in an attempt to avoidTebexPlugin::getApi()
andTebexPlugin::getInformation()
from being nullable on runtime when a valid secret is provided.TebexAPI
class (TebexPlugin::getApi()
) to let other plugins call tebex endpoints directly. Do note theTebexAPI
is isolated from the plugin (the plugin relies onTebexAPI
butTebexAPI
doesn't rely on the plugin). Since all API calls are asynchronous, you'll need to handle the response via a callback. For example:TebexPlugin::getApi()->getInformation(TebexResponseHandler::onSuccess(function(TebexInformation $info) : void{}));
/buy
) - the categories are freshly fetched every 3 minutes without the involvement of a task. Only when a category GUI is requested while the plugin holds an expired category response is, the response is freshly fetched asynchronously./tebex info
.Bug Fixes
/tebex secret <secret>
is blocking for reasons mentioned above.Poggit Integration
Since this plugin now depends upon poggit libraries, once integrated, poggit will handle the
.phar
creation (along with the libraries) and run lint checks.