Class ExitOffer

java.lang.Object
me.EtienneDx.RealEstate.Transactions.ExitOffer
All Implemented Interfaces:
org.bukkit.configuration.serialization.ConfigurationSerializable

public class ExitOffer extends Object implements org.bukkit.configuration.serialization.ConfigurationSerializable
Represents an exit offer for a RealEstate transaction.

An exit offer is used to propose an early exit from an ongoing transaction. It contains the UUID of the player making the offer and the offered price.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The UUID of the player who made the exit offer.
    double
    The price offered to exit the transaction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an ExitOffer from a serialized map.
    ExitOffer(UUID offerBy, double price)
    Constructs an ExitOffer with the specified offeror and price.
  • Method Summary

    Modifier and Type
    Method
    Description
    Serializes this ExitOffer into a map.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • offerBy

      public UUID offerBy
      The UUID of the player who made the exit offer.
    • price

      public double price
      The price offered to exit the transaction.
  • Constructor Details

    • ExitOffer

      public ExitOffer(UUID offerBy, double price)
      Constructs an ExitOffer with the specified offeror and price.
      Parameters:
      offerBy - the UUID of the player making the exit offer
      price - the offered price for the exit
    • ExitOffer

      public ExitOffer(Map<String,Object> map)
      Constructs an ExitOffer from a serialized map.
      Parameters:
      map - a map containing the serialized exit offer data
  • Method Details

    • serialize

      public Map<String,Object> serialize()
      Serializes this ExitOffer into a map.
      Specified by:
      serialize in interface org.bukkit.configuration.serialization.ConfigurationSerializable
      Returns:
      a map representation of this ExitOffer