Comments (6)
Sorry for not answering, but spinning up a MySQL server for testing is always a bit annoying.
I have tested the edge case and it works now without any problems.
I also noticed that the released version string and the version in your plugin.yml do not match
from totaleconomy.
Hi @Sytm, this was done on purpose as I didn't see a need for Total Economy to handle running all the withdraw logic when the amount was zero. I'd be curious to know more about the use case you brought up and if this is indeed something we should look into supporting for the withdraw command.
Currently I don't envision Total Economy supporting frozen accounts, though if we did there'd be a way to check that state without having to use withdraw
. Thanks.
from totaleconomy.
For some context: My plugin allows admins providing a custom formula, so they can customize the price increase for teleportations (like constant price, linear growth, exponential growth, etc). My plugin uses the Vault API to query and modify the amount of money a player has.
One user reported an issue that they cannot teleport when using a formula that evaluates to zero for the first teleport and then increases with each successive one, when using this economy plugin.
My issue here is just based on the technically correct behavior according the Vault API that it's implementations should follow (I would at least expect them to do), because some economy plugins might support freezing and have different behavior, while this one doesn't but shouldn't disallow zero withdrawals.
(You could also short circuit the execution of the deposit / withdraw methods in your Vault implementation on zero amounts with a successful result, without altering the behavior of the rest of your plugin, although that would be a somewhat dirty solution)
from totaleconomy.
Thanks for the context @Sytm. This makes sense. I have an idea that'll allow for the Total Economy implementation of Vault to allow zero as a value while also preventing it from other areas in the plugin where zero shouldn't be allowed (e.g. Total Economy's pay
command). Best of both worlds I think. I'll let you know when that's in place. Thanks again!
And just so I remember when I'm making changes for this, this change should also be made to the deposit functionality as well.
from totaleconomy.
Hi @Sytm, give this new release a shot: https://modrinth.com/plugin/total-economy/version/0.12.1. Thanks
from totaleconomy.
Hi @Sytm, following up again to see if this is resolved. If there's no response in the next couple of days I'll close this issue to avoid it getting too stale, though feel free to reopen if it is still an issue. Thanks.
from totaleconomy.
Related Issues (20)
- Pam's Harvestcraft Fish
- Chest Shop Help
- Thingy to do with the jobs. HOT 1
- Total economy, Shop command doesnt work HOT 1
- Using adminpay to deduct currency from a player's balance can still result in a negative balance HOT 3
- Anyone get money doing their worrk
- Multiple Currency support
- issue with /job reload HOT 1
- SQL Database Connection Issues HOT 4
- The farmer's job doesn't work. HOT 3
- Building Total Economy doesn't work
- Farmer Sets
- Issue with Chest Shop
- Not receiving pokedollars from collecting any resource HOT 1
- Job level requirement HOT 3
- Miner job has nonexistent jobset "ores"
- RLCraft with Jobs
- Jobs not working HOT 11
- Look into migrating to prefixed block/item ids HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from totaleconomy.