Changed the broadcast system and split it into a single or group package broadcast. When a broadcast is triggered it'll wait with a buffer of 3 seconds for more broadcasts and it'll group them together instead of spamming the same one message over and over.
Note: This only works for ZNPCsPlus v2.x.x and all StoreStats does is trigger the NPC to respawn/update nothing else. Names and skins etc. are handled by ZNPCsPlus and you should use Placeholders for their skin and text which you could do before this update but this just ensures they are always updated when a store refresh happens.
Added a package formatting config setting only for Tebex stores.
Added a new display type, hologram - needs DecentHolograms to be installed to be able to use, can use a dynamic package line so each package is on a new hologram line.
Added package support, the plugin now stores the package information from the store and can now be displayed with a placeholder and also on the GUI system.
MineStore isn't supported for this yet due to not knowing the API, if you use MineStore please DM me.
Added a new GUI browser so you can look at all the timeframe information in a single place. The command is /StoreStats GUI [Timeframe] and the permission is storestats.command.gui. The GUI will live update whenever the internal cache is updated as well.
Added a new %payment_date% placeholder to use in some config settings.
Added Broadcast Effects. Do /StoreStats broadcast (player name) (package price) (package name) (permission: storestats.command.broadcast) to broadcast a new purchase/donation from a player, online or offline and do effects for it including a chat message, sound, fireworks and particles, all configurable in the config.yml.
Fixed the "Change Armor Stand Names" config setting not doing anything. It was made for the old display system where it would toggle updating the armor stand above the sign but was never removed in the display system update. This update adds functionality back to it to toggle if StoreStats should change the armor stands name or not.
Added "Change NPC Names" which is the same as the change armor stand names config but for NPCs.
The plugin now skips Tebex payments where the player ID is 0 or less, this happens when the purchaser didn't supply a Minecraft username. This also fixes an error.
Fixed Citizens NPC displays getting removed for being invalid when not. You may need to set your NPCs again for this change to affect previously made displays unless they updated just fine of course.
Added /StoreStats unset (display type) with permission storestats.command.unset that'll unset the display from the database if the location is in there.
Changed some default messages in the config. (You need to update)
Improved armor stand and Citizens NPC updating by basing the search location from the center of the block, fixes armor stand and NPCs not updating when on a slab for example.
Removed an extra &a in the default command message.
The plugin is now built against 1.18.2.
Updated Authlib to 3.3.39 from 2.0.27.
Organized listeners around into their own classes.
The plugin will now register a Citizens listener if Citizens is detected on startup and will remove NPC display types when a Citizens NPC is removed or despawned.
Added MineStore support - You need version 2.5 or higher of MineStore to use this and you can connect to the API with or without an API key but I highly, highly recommend using an API key to access your API.
Fixed issues with updating Citizens NPC display types, the plugin will now give Citizens some time to load in their NPCs before attempting to update them.
StoreStats already works on Java 16 & Minecraft 1.17, no need to update.
Unify getPayment/getTopPayment into one single method instead of checking the timeframe and use a different method for each type, now it'll just use one and stop pointless checking.
Fixed the plugin getting some pointless information when getting payments even if we're not going to actually use/need it because we hit our cache amount.
Changed how the Citizens/NPC skin gets applied, this should fix some issues when the skin doesn't get changed.
Added timeframe support to the /storestats payment command to allow checking for the top weekly and monthly donators instead of only the recent payments.
Made the new recent timeframe work on the new placeholders.
Removed the old placeholders e.g %storestats_payment_amount_1% because of the newly added timeframe placeholders. (Using recent as the timeframe in them is the same as this)
Changed the new placeholders from %storestats_top_payment_amount_ID_TIMEFRAME% to %storestats_payment_amount_ID_TIMEFRAME%
You now need to enter a timeframe when making a sign (on the 3rd line) such as Recent, Week or Month. The recent timeframe will show the most X most recent payment, the week and month will show the X top donor from that timeframe.
The plugin will now get all payments (Limited by the cache amount in the config) and add them up to work out the top donors in the last week and month. If you get more payments than the cache amount in your config in a week or month (Depending on what you use) you may need to raise the cache amount.
The plugin now uses a PaymentDetails and GoalDetails class for their information instead of having a bunch of strings inside a map. Everything should work the same but I may have missed some edge cases so please report them if you find any issues!
Change how Tebex payments are received and cached from their single payments API with a limit of 100 to their paged system that allowed to cache infinite payments.
Added community goal support for CraftingStore since they just added the API for it.
No config changes.
NOTE: If you get "INVALID GOAL" and you are 100% sure you're using the correct ID for the goal as seen under the Placeholders section on how to get the ID then you will have to wait or create a manual payment to update the goal API. The goals only update on payments, not goal creation/deletion, this should be fixed soon
https://github.com/CraftingStore/Suggestions/issues/422#issuecomment-744496644
Added a minimum payment system. For example, if you set it to 0.01 in the config.yml then all 0.00 payments will be excluded. If you set it to 50.00 it'll exclude all payments under that etc.
I noticed some lag of 700ms+ ticks during my post update push check and found that the updater task after reloading was changing into a normal sync task, not an async one. Basically fixed the lag from the updater after you reload the plugin once.
Changed the sign updater task into just the payment updater task which updates goal and payment caches including signs.
Made the updater task run after its connections to your store.
Made the updater task run on the force command instead of
Removed the sign updater animation due to it not being needed anymore.
Added a max cache amount into the config.
Completely changed the internals to work completely on a cache system instead of connecting to your store EACH time it wants to get payment information. Before if you had 10 signs, it'll do 10 connections but now it'll do one and also cache them for future signs if ever needed! The payment cache will update on startup, the task timer set in the config and if you do /storestats force. Due to the big internal changes, I've decided to make this v2.0.0.
Added hex color support for all config messages including the sign format. Use <#XXXXXX> for hex colors, for example <#e809ca> will turn out a nice hot pink.
Due to addition of CraftingStore a lot of the plugin got reworked to support more than a single store, if you have any issues please DM me straight away or post in the discussion thread!
Please make sure to update your config or regenerate it. CraftingStore doesn't have Community/Donation Goals API that feature will NOT work right now and will return invalid goal.
I recently got contacted by Tim, The owner of CraftingStore and he has been nice enough to support me with an API for Store information and payments but nothing for community goals right now.
I will be adding support for payments in the coming week or so, have a bunch of IRL things I'm forced to deal with.
Mark a community goal is been updated faster (Not in the async method) to stop other placeholders attempting store connections on top of the one already being made when requested at the same time.
Community Goals' Current and target amount, progress and progress bars can now be displayed in
ANYTHING that supports
PlaceholderAPI such as Holograms, Scoreboards, Chat and more!
Follow the setup guide on the main place and check the placeholders section for how to use this new feature.
This uses caching so you don't have to worry about a million connection to your store for the information. When a goal ID is requested it will check if its in the cache and fetch that information, other wise it will connect to the store for the information and then cache it for future requests, then in the Updating task that is set in the config will get all the cached IDs and request the latest information on them.
This is a
big feature update and I'm really excited for it.
Changed the update task and force command to update both sign data and community goals that are currently cached.
Added all the community goal information on the main thread and added two gifs that showcase the plugin features (Low-quality gifs because of limits and gifs are bad...) with a title tweak.