Closed Mobmaker55 closed 4 years ago
Please always test if issues still exist in the latest development build.
As for your own Economy plugin: That should work just fine as long as you provide a fully implemented Vault Economy adapter. Make sure that you return a response on Economy#depositPlayer
as it looks like that's the object that it fails one (if nothing changed in the class between your ChestShop version and the latest code)
What should be in my return
statement for Economy#depositPlayer? I just have it as return null;
because it's a EconomyResponse
type, and all the tutorials / my friends said "just return null
man."
It should return an EconomyResponse
object which contains whether or not the transaction was successful. Returning null will break any plugin properly handling failed transactions (like ChestShop tries to do which causes the error)
This is going to sounds stupid, as I'm still not a great dev, but how does one respond with an EconomyResponse
object that isn't null? Everything seems to error out in my IDE...
You create a new instance with new EconomyResponse(the stuff it wants in the constructor)
:)
Thank you so much! Sorry about that being completely my mistake :)
Also, very awesome plugin, I've used this for as long as I can remember!
Plugin Version
3.11 (build 213)
Plugin Config
Server Version
Paper version git-Paper-149 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
Server Log
What other plugins are you running?
BasicEcon 1.0 ChatEx 2.6.1 ChestShop 3.11 (build 213) dynmap version 3.1-beta3a-409 HolographicDisplays 2.4.4 LuckPerms 5.1.93 OpenInv 4.1.4 PlaceholderAPI 2.10.9 PlugMan 2.1.7 ProtocolLib 4.5.1 Shopkeepers 2.11.0 SilkSpawners 6.4.0 TabList 5.4.5 UberEnchant 8.9.1 Vault 1.7.3-b131 VaultChatFormatter 1.0-SNAPSHOT WorldEdit 7.2.0-beta-04+98f71a3 WorldGuard 7.0.4-beta1;bc551da
What is happening?
1) Make admin shop sign (admin shop was changed to just "Shop")
2) Have a user try to sell something
3) Nothing but an error
![image](https://user-images.githubusercontent.com/45888585/91742128-bfd6f400-eb83-11ea-9725-1ff1ff617cac.png)
What did you expect to happen?
What I expected was for the diamond to be removed from Mobmaker55's inventory, and for Mobmaker55 to recieve $100 ingame.
Additional context
I am using my own economy plugin, so if I need to add / edit something, please let me know. I didn't know exactly what the
onCurrencyAdd
function was for, so I didn't know if I needed to change something in my plugin or not. If this is on my end, please just tell me what I need to implement. Thanks!