More error handling has been added to help prevent players from losing out due to a configuration error or any unexpected transaction error.
Failed transactions will log errors in the console, with enough information for you to reimburse the player (or re-issue a new pouch).
Pouches which have invalid economy types will no longer default to Vault, instead they will use an 'Invalid' economy type preventing their use.
Custom economy types can no longer override built-in types, or types directly made by hooking into MoneyPouch.
Warnings in console have been added to help you locate and fix broken pouches, or custom economy types.
Config update: See the comments in the config here for more info and to adjust the behaviour of error handling.
Code (YAML):
error-handling: # It is recommended you set the following to 'true' in a production environment # The plugin will log should a transaction fail for any reason, allowing you to investigate # and manually reward the player yourself # The player will be alerted and asked to tell an admin should this event occur regardless if this is disabled # You can change this message ('reward-error') at the bottom of the config log-failed-transactions: true
# Refund the pouch to the player (if they are online) in the event a transaction failed - this is default # to 'false' as this results in a different prize on the second try, and it is unlikely # that the transaction will succeed if it had already failed. It is recommended # to keep this 'false' and manually investigate when errors occur. refund-pouch: false
# Prevent opening pouches which have an invalid economy type assigned to them. # The message 'invalid-pouch' will be sent to the player. prevent-opening-invalid-pouches: true
New | /moneypouchadmin command - all commands related to reloading and viewing existing pouches have been relocated here
This is to prevent command arguments overriding pouch IDs, all pouches are given using /mp.
Fix | LemonMobCoins economy type failing after it is reloaded using plugman (or similar)
Please note the configuration layout has changed! See the new config here.
New | XP Pouches has been added.
You can now have multiple economy types. See "options.economytype". The valid options are XP and VAULT.
Code (YAML):
pouches:
tier:
xp-1:
name: "&6&lTier I XP Pouch &r&7(Right Click)" item: "CHEST" pricerange:
from: 20
to: 400
options:
economytype: "XP"# <------- here lore: -
"&7Open this pouch to receive experience!"
New | The revelation of prizes can be now reversed.
Changing reverse-pouch-reveal to true will have this effect.
Code (YAML):
... reverse-pouch-reveal: true
...
New | The whole plugin is now open source.
The plugin has been fully recoded allowing a much more easier way of adding economies. Please leave suggestions inside Discord.
As suggested by @HashtagMCSG (and a few others) on June 20 2017, I am finally able to deliver almost a year later. MoneyPouch titles and chat messages now have commas.
[Warning]Updating will render existing MoneyPouches in the world useless and un-openable!
Now, in a re-code, you would expect a lot of changes right? Well, in this case, not really. There's only two major changes to point out:
Optimised the code and organised it a lot.
Removed that horrible, annoying, ridiculous, awful, terrible blank line at the bottom of the lore on all MoneyPouches. Because of this, all existing MoneyPouches will not be open-able. All new MoneyPouches that are spawned in will no longer have the blank line at the bottom.