Class NovaConfig.CustomTaxEvent

java.lang.Object
us.teaminceptus.novaconomy.api.NovaConfig.CustomTaxEvent
Enclosing interface:
NovaConfig

public static final class NovaConfig.CustomTaxEvent extends Object
Represents a Custom Tax Event in the configuration
  • Constructor Details

    • CustomTaxEvent

      public CustomTaxEvent(String identifier, String name, List<Price> prices, String permission, String message, boolean usingIgnore, List<String> ignore, boolean online, boolean deposit)
      Constructs a CustomTaxEvent.
      Parameters:
      identifier - The identifier of the event as the key in the configuration.
      name - The name of the event.
      prices - Prices that will be deducted from the player.
      permission - The permission required to call this event.
      message - The message that will be sent to the player.
      usingIgnore - Whether the event is including the default ignore list.
      ignore - The list of Permissions, Players or Groups that are not affected.
      online - Whether the event is only called when the player is online.
      deposit - Whether the event will deposit into the global bank
  • Method Details

    • getIdentifier

      public String getIdentifier()
      Fetches the identifier of the event stored in the configuration.
      Returns:
      Event ID
    • getName

      @NotNull public @NotNull String getName()
      Gets the name of the event.
      Returns:
      The name of the event.
    • getPermission

      @NotNull public @NotNull String getPermission()
      Gets the permission required to call this event.
      Returns:
      The permission required to call this event.
    • isOnline

      public boolean isOnline()
      Whether the Player has to be online to be affected.
      Returns:
      true if online mode, else false
    • getPrices

      @NotNull public @NotNull List<Price> getPrices()
      Gets a list of Prices that the player will be deducted from.
      Returns:
      Prices that the player will pay
    • isUsingIgnore

      public boolean isUsingIgnore()
      Whether this Event is including the default event list in getIgnoring().
      Returns:
      true if using ignore, else false
    • getIgnoring

      @NotNull public @NotNull List<String> getIgnoring()
      Gets all of the Permissions, Players or Groups that are not affected.
      Returns:
      A list of Permissions, Players or Groups that are not affected.
    • getMessage

      @NotNull public @NotNull String getMessage()
      Fetches the message sent to the player.
      Returns:
      The message sent to the player.
    • setMessage

      public void setMessage(@NotNull @NotNull String message) throws IllegalArgumentException
      Sets the message sent to the player.
      Parameters:
      message - Message sent
      Throws:
      IllegalArgumentException - if message is null
    • setName

      public void setName(@NotNull @NotNull String name) throws IllegalArgumentException
      Sets the name of this event.
      Parameters:
      name - Name of event
      Throws:
      IllegalArgumentException - if name is null
    • setPermission

      public void setPermission(String permission) throws IllegalArgumentException
      Sets the permission required to call this event.
      Parameters:
      permission - Permission required to call this event.
      Throws:
      IllegalArgumentException - if permission is null
    • setOnline

      public void setOnline(boolean online)
      Sets whether the Player has to be online to be affected.
      Parameters:
      online - true if online mode, else false
    • setPrices

      public void setPrices(@NotNull @NotNull Collection<? extends Price> prices) throws IllegalArgumentException
      Sets the list of Prices that the player will be deducted from.
      Parameters:
      prices - Prices that the player will pay
      Throws:
      IllegalArgumentException - if price collection is null
    • setUsingIgnore

      public void setUsingIgnore(boolean usingIgnore)
      Sets whether this Event is including the default event list in getIgnoring().
      Parameters:
      usingIgnore - true if using ignore, else false
    • setIgnore

      public void setIgnore(@NotNull @NotNull Collection<? extends String> ignore) throws IllegalArgumentException
      Sets the list of Permissions, Players or Groups that are not affected.
      Parameters:
      ignore - A Collection of Permissions, Players or Groups that are not affected.
      Throws:
      IllegalArgumentException - if ignore collection is null
    • isDepositing

      public boolean isDepositing()
      Whether this Event is depositing into the global bank.
      Returns:
      true if depositing, else false
    • setDepositing

      public void setDepositing(boolean deposit)
      Sets whether this Event is depositing into the global bank.
      Parameters:
      deposit - true if depositing, else false