-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I will be first to admit i have never written a line of Java in my life!
But i believe this captures the idea of what i mean, and how it works.
// sponge things
import "org.spongepowered.api.Sponge";
import "org.spongepowered.api.service.economy.EconomyService";
// java things
import "java.util.UUID";
import "java.math.BigDecimal";
var uuid = //whatever the uuid of player whoever killed it
var value = //value pulled from monsters.conf
public class spongeEconomyDeposit(uuid,value){
var account = org.spongepowered.api.service.economy.EconomyService.getOrCreateAccount(UUID.fromString(uuid)) //gets Economy Account for the Player.
var value = java.util.UUID(value) //value in () is value to be deposited.
var currency = org.spongepowered.api.service.economy.EconomyService.getDefaultCurrency() //gets DefaultCurrency of the Economy Plugin
var cause = org.spongepowered.api.Sponge.getCauseStackManager().getCurrentCause() //gets the Cause Manager from Sponge
account.get().deposit(currency,value,cause) //deposit amount of value into players account.
}
https://docs.spongepowered.org/stable/en/plugin/economy/index.html
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels