java.lang.Object
us.teaminceptus.novaconomy.api.player.Bounty
All Implemented Interfaces:
Comparable<Bounty>, ConfigurationSerializable

public final class Bounty extends Object implements ConfigurationSerializable, Comparable<Bounty>
Represents a Bounty placeable on a player
  • Method Details

    • builder

      public static Bounty.Builder builder()
      Creates a new Bounty Builder.
      Returns:
      Bounty Builder
    • getOwner

      @NotNull public @NotNull OfflinePlayer getOwner()
      Fetches the Owner of this Bounty.
      Returns:
      Bounty Owner
    • isOwner

      public boolean isOwner(@Nullable @Nullable OfflinePlayer p)
      Whether this Player is the owner of this Bounty.
      Parameters:
      p - Player to check
      Returns:
      true if owner, else false
    • getEconomy

      @NotNull public @NotNull Economy getEconomy()
      Fetches the Economy this Bounty has been placed in.
      Returns:
      Bounty Economy
    • getTarget

      @NotNull public @NotNull OfflinePlayer 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

      public Map<String,Object> serialize()
      Specified by:
      serialize in interface ConfigurationSerializable
    • deserialize

      @Nullable public static @Nullable Bounty deserialize(@Nullable @Nullable Map<String,Object> serialize) throws IllegalArgumentException
      Deserializes a Map into a Bounty.
      Parameters:
      serialize - Serialization from serialize()
      Returns:
      Deserialized Bounty, or null if not found
      Throws:
      IllegalArgumentException - if an object is missing or malformed
    • compareTo

      public int compareTo(@NotNull @NotNull Bounty o)
      Specified by:
      compareTo in interface Comparable<Bounty>