Interface TaxManager

All Superinterfaces:
Savable

public interface TaxManager extends Savable
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getTax(org.bukkit.entity.Player player, long price, org.bukkit.inventory.ItemStack itemStack, TaxType type)
    Calculates the tax for a given price, item stack, and tax type.
    getTax(org.bukkit.inventory.ItemStack itemStack)
    Gets the tax applicable to a specific item stack.
    double
    getTaxPercent(org.bukkit.inventory.ItemStack itemStack, TaxType type)
    Gets the tax percentage applicable to a specific item stack and tax type.
    double
    reverseTax(long price, org.bukkit.inventory.ItemStack itemStack)
    Reverses the tax calculation to determine the original price before tax.

    Methods inherited from interface fr.maxlego08.zauctionhouse.api.storage.Savable

    load, save
  • Method Details

    • getTax

      Optional<Tax> getTax(org.bukkit.inventory.ItemStack itemStack)
      Gets the tax applicable to a specific item stack.
      Parameters:
      itemStack - the item stack to check.
      Returns:
      an Optional containing the Tax if applicable, or an empty Optional if no tax applies.
    • getTax

      double getTax(org.bukkit.entity.Player player, long price, org.bukkit.inventory.ItemStack itemStack, TaxType type)
      Calculates the tax for a given price, item stack, and tax type.
      Parameters:
      player - the player for whom the tax is being calculated.
      price - the price of the item.
      itemStack - the item stack being taxed.
      type - the type of tax.
      Returns:
      the calculated tax amount.
    • reverseTax

      double reverseTax(long price, org.bukkit.inventory.ItemStack itemStack)
      Reverses the tax calculation to determine the original price before tax.
      Parameters:
      price - the price after tax.
      itemStack - the item stack being taxed.
      Returns:
      the original price before tax.
    • getTaxPercent

      double getTaxPercent(org.bukkit.inventory.ItemStack itemStack, TaxType type)
      Gets the tax percentage applicable to a specific item stack and tax type.
      Parameters:
      itemStack - the item stack to check.
      type - the type of tax.
      Returns:
      the tax percentage.