Class Bounty
java.lang.Object
us.teaminceptus.novaconomy.api.player.Bounty
- All Implemented Interfaces:
Comparable<Bounty>,ConfigurationSerializable
Represents a Bounty placeable on a player
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a builder class for a Bounty -
Method Summary
Modifier and TypeMethodDescriptionstatic Bounty.Builderbuilder()Creates a new Bounty Builder.intstatic @Nullable Bountydeserialize(@Nullable Map<String, Object> serialize) Deserializes a Map into a Bounty.doubleFetches the Amount of this Bounty.@NotNull EconomyFetches the Economy this Bounty has been placed in.@NotNull OfflinePlayergetOwner()Fetches the Owner of this Bounty.@NotNull OfflinePlayerFetches the Target of this Bounty.booleanisOwner(@Nullable OfflinePlayer p) Whether this Player is the owner of this Bounty.voidsetAmount(double amount) Sets the Amount of this Bounty.
-
Method Details
-
builder
Creates a new Bounty Builder.- Returns:
- Bounty Builder
-
getOwner
Fetches the Owner of this Bounty.- Returns:
- Bounty Owner
-
isOwner
Whether this Player is the owner of this Bounty.- Parameters:
p- Player to check- Returns:
- true if owner, else false
-
getEconomy
Fetches the Economy this Bounty has been placed in.- Returns:
- Bounty Economy
-
getTarget
Fetches the Target of this Bounty.- Returns:
- Bounty Target
-
getAmount
public double getAmount()Fetches the Amount of this Bounty.- Returns:
- Bounty Amount
-
setAmount
public void setAmount(double amount) Sets the Amount of this Bounty.- Parameters:
amount- Amount to set
-
serialize
- Specified by:
serializein interfaceConfigurationSerializable
-
deserialize
@Nullable public static @Nullable Bounty deserialize(@Nullable @Nullable Map<String, Object> serialize) throws IllegalArgumentExceptionDeserializes a Map into a Bounty.- Parameters:
serialize- Serialization fromserialize()- Returns:
- Deserialized Bounty, or null if not found
- Throws:
IllegalArgumentException- if an object is missing or malformed
-
compareTo
- Specified by:
compareToin interfaceComparable<Bounty>
-