Class StoreProduct

java.lang.Object
dk.minepay.server.bukkit.classes.StoreProduct
All Implemented Interfaces:
StoreItem

public class StoreProduct extends Object implements StoreItem
Class representing a product in the store.
  • Constructor Details

    • StoreProduct

      public StoreProduct()
      Default constructor for StoreProduct.
    • StoreProduct

      public StoreProduct(String name, String id, double price, double quantity, HashMap<String,String> metadata)
      Constructor for StoreProduct with metadata.
      Parameters:
      name - the name of the product
      id - the unique identifier of the product
      price - the price of the product
      quantity - the quantity of the product
      metadata - additional metadata for the product
    • StoreProduct

      public StoreProduct(String name, String id, double price, double quantity)
      Constructor for StoreProduct without metadata.
      Parameters:
      name - the name of the product
      id - the unique identifier of the product
      price - the price of the product
      quantity - the quantity of the product
  • Method Details

    • toJson

      public com.google.gson.JsonObject toJson()
      Converts the StoreProduct to a JSON object.
      Returns:
      a JsonObject representing the StoreProduct
    • toString

      public String toString()
      Overrides:
      toString in class Object