mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-12 06:58:04 +02:00
c3b084fd1a
- Added shop refund message - Recoded Register for ChestShop - Added VAULT support (Register is used when no Vault is found) - Added Heroes exp option for granting exp for shop creation - EXPERIMENTAL: Option to cause BlockState.update() every transaction (probably doesn't work, as Block.applyPhysics() is needed) - Added ChestShop.nofee permission for free shop creation (and no refunds) - Added a separate Admin Shop tax option -
34 lines
819 B
Java
34 lines
819 B
Java
package com.Acrobot.ChestShop.Economy;
|
|
|
|
import com.nijikokun.register.payment.forChestShop.Method;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class Register implements EcoPlugin{
|
|
public static Method eco;
|
|
public boolean hasAccount(String player) {
|
|
return eco.hasAccount(player);
|
|
}
|
|
|
|
public void add(String player, double amount) {
|
|
eco.getAccount(player).add(amount);
|
|
}
|
|
|
|
public void subtract(String player, double amount) {
|
|
eco.getAccount(player).subtract(amount);
|
|
}
|
|
|
|
public boolean hasEnough(String player, double amount) {
|
|
return eco.getAccount(player).hasEnough(amount);
|
|
}
|
|
|
|
public double balance(String player) {
|
|
return eco.getAccount(player).balance();
|
|
}
|
|
|
|
public String format(double amount) {
|
|
return eco.format(amount);
|
|
}
|
|
}
|