Class Bounty.Builder
java.lang.Object
us.teaminceptus.novaconomy.api.player.Bounty.Builder
- Enclosing class:
- Bounty
Represents a builder class for a Bounty
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the BountysetAmount(double amount) Sets the Amount of this Bounty.setEconomy(@NotNull Economy econ) Sets the Economy of this Bounty.setOwner(@NotNull OfflinePlayer owner) Sets the Owner of this Bounty.setOwner(@NotNull NovaPlayer owner) Sets the Owner of this Bounty.setTarget(@NotNull OfflinePlayer target) Sets the Target of this Bounty.
-
Method Details
-
setOwner
Sets the Owner of this Bounty.- Parameters:
owner- Bounty Owner- Returns:
- this builder, for chaining
-
setOwner
Sets the Owner of this Bounty.- Parameters:
owner- Bounty Owner- Returns:
- this builder, for chaining
-
setEconomy
Sets the Economy of this Bounty.- Parameters:
econ- Economy of this Bounty- Returns:
- this builder, for chaining
-
setAmount
Sets the Amount of this Bounty.- Parameters:
amount- Amount of this Bounty- Returns:
- this builder, for chaining
-
setTarget
Sets the Target of this Bounty.- Parameters:
target- Target of this Bounty- Returns:
- this builder, for chaining
-
build
Builds the Bounty- Returns:
- Bounty Built
- Throws:
UnsupportedOperationException- if a bounty with this target already existsIllegalArgumentException- if amount is not positive, or owner/economy/target are null
-