Closed PancakeCatsss closed 1 year ago
Check out 1.4 on the CI: https://ci.codemc.io/job/BentoBoxWorld/job/Bank/
Perfect. Thank you.
Noticed one slight issue, say i have a balance of "43790.85" when I go to tab it via the command it then shows as "43790.85999999999" which leads to the message that it has to be less than 10 digits. Maybe format the double to 1 decimal place?
Edit: This is only an issue with the deposit command, withdrawing is perfect
The joys of double precision! There could be an issue with rounding, e.g. "43790.85999999999" will round to "43790.9" for 1 place, and "43790.86" for two, both of which is larger than the amount you have in your hand. Maybe for depositing I have to round down and do it to 2 decimal places. I'll try that.
Hi, Just wondering if there is any examples of how to access an Addon such as the Bank (for adding/remove from a players island bank) through the API?
Thanks.
If you are writing an Addon, then all the methods you need are in the BankManager class, and you can obtain the BankManager from the main class Bank. However, if you are writing a Plugin, then I'll need to migrate Bank to a Pladdon, which will enable you to access these classes. It's easy to make it a Pladdon so let me know what you are writing.
See: https://ci.codemc.io/job/BentoBoxWorld/job/Bank/ws/target/apidocs/world/bentobox/bank/BankManager.html https://ci.codemc.io/job/BentoBoxWorld/job/Bank/ws/target/apidocs/world/bentobox/bank/Bank.html#getBankManager--
Thank you for the reply, Indeed it is for a plugin not an Addon.
The joys of double precision! There could be an issue with rounding, e.g. "43790.85999999999" will round to "43790.9" for 1 place, and "43790.86" for two, both of which is larger than the amount you have in your hand. Maybe for depositing I have to round down and do it to 2 decimal places. I'll try that.
hey is it still on development ? we still have the message for the 10 digits
Is your feature request related to a problem?
Pretty simple request, would be nice to be able to either tab complete your balance or add an "all" variable when you deposit or withdraw so you don't have to type the amount out if you just want to deposit or withdraw everything.
Describe the solution you'd like.
Adding /is bank withdraw all and /is bank deposit all
Describe alternatives you've considered.
Having it tab complete your balance or island balance would do the same thing pretty much.
Agreements
Other
Thanks.