Class PlayerBuyPlotEvent

All Implemented Interfaces:
CancellablePlotEvent

Called when a user attempts to buy a plot.

Setting the Result to Result.FORCE ignores the price and players account balance and does not charge the player anything. Result.DENY blocks the purchase completely, Result.ACCEPT and null do not modify the behaviour.

Setting the price to 0 makes the plot practically free.

Since:
7.3.2
  • Constructor Details

  • Method Details

    • setPrice

      public void setPrice(@org.checkerframework.checker.index.qual.NonNegative double price)
      Sets the price required to buy the plot.
      Parameters:
      price - the new price.
      Since:
      7.3.2
    • price

      public @org.checkerframework.checker.index.qual.NonNegative double price()
      Returns the currently set price required to buy the plot.
      Returns:
      the price.
      Since:
      7.3.2
    • setEventResult

      public void setEventResult(@Nullable Result eventResult)
      Set the Result for this event.
      Specified by:
      setEventResult in interface CancellablePlotEvent
      Parameters:
      eventResult - the new result.
    • getEventResult

      public @Nullable Result getEventResult()
      The currently set Result for this event (as set by potential previous event listeners).
      Specified by:
      getEventResult in interface CancellablePlotEvent
      Returns:
      the current result.