Class CommandCost

java.lang.Object
com.booksaw.betterTeams.cost.CommandCost
Direct Known Subclasses:
CostManager.NoCost

public class CommandCost extends Object
  • Constructor Details

    • CommandCost

      public CommandCost(String command, double cost)
      Used within Cost manager to track a new commands Cost
      Parameters:
      command - the reference for the command
      cost - how long of a Cost that command has (in seconds)
  • Method Details

    • runCommand

      public boolean runCommand(org.bukkit.entity.Player player)
      Run when a player runs the command to subtract the cost of the command
      Parameters:
      player - the player to add a Cost for
      Returns:
      If the player can run the command (if the transaction is a success or failure)
    • hasBalance

      public boolean hasBalance(org.bukkit.entity.Player player)
      Parameters:
      player - the player to check for
      Returns:
      if a player has the money to run that command (to check before executing the command)
    • getCost

      public double getCost()
    • getCommand

      public String getCommand()