Package us.teaminceptus.novaconomy.api
Class NovaConfig.CustomTaxEvent
java.lang.Object
us.teaminceptus.novaconomy.api.NovaConfig.CustomTaxEvent
- Enclosing interface:
- NovaConfig
Represents a Custom Tax Event in the configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFetches the identifier of the event stored in the configuration.Gets all of the Permissions, Players or Groups that are not affected.@NotNull StringFetches the message sent to the player.@NotNull StringgetName()Gets the name of the event.@NotNull StringGets the permission required to call this event.Gets a list of Prices that the player will be deducted from.booleanWhether this Event is depositing into the global bank.booleanisOnline()Whether the Player has to be online to be affected.booleanWhether this Event is including the default event list ingetIgnoring().voidsetDepositing(boolean deposit) Sets whether this Event is depositing into the global bank.voidsetIgnore(@NotNull Collection<? extends String> ignore) Sets the list of Permissions, Players or Groups that are not affected.voidsetMessage(@NotNull String message) Sets the message sent to the player.voidSets the name of this event.voidsetOnline(boolean online) Sets whether the Player has to be online to be affected.voidsetPermission(String permission) Sets the permission required to call this event.voidsetPrices(@NotNull Collection<? extends Price> prices) Sets the list of Prices that the player will be deducted from.voidsetUsingIgnore(boolean usingIgnore) Sets whether this Event is including the default event list ingetIgnoring().
-
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
Fetches the identifier of the event stored in the configuration.- Returns:
- Event ID
-
getName
Gets the name of the event.- Returns:
- The name of the event.
-
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
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 ingetIgnoring().- Returns:
- true if using ignore, else false
-
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
Fetches the message sent to the player.- Returns:
- The message sent to the player.
-
setMessage
Sets the message sent to the player.- Parameters:
message- Message sent- Throws:
IllegalArgumentException- if message is null
-
setName
Sets the name of this event.- Parameters:
name- Name of event- Throws:
IllegalArgumentException- if name is null
-
setPermission
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 ingetIgnoring().- 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
-