Interface Currency


public interface Currency
独立于任何具体经济插件 API 的货币。
  • Method Details

    • id

      String id()
    • balance

      BigDecimal balance(org.bukkit.entity.Player player)
    • has

      default boolean has(org.bukkit.entity.Player player, BigDecimal amount)
    • take

      CurrencyResult take(org.bukkit.entity.Player player, BigDecimal amount)
    • give

      CurrencyResult give(org.bukkit.entity.Player player, BigDecimal amount)
    • format

      String format(BigDecimal amount)
    • minorUnit

      default BigDecimal minorUnit()
      该货币可扣除或存入的最小金额;任意精度时返回 null。 整数货币应返回 BigDecimal.ONE,使组合规划向下取整其份额, 避免发起注定失败的扣款。