Class PlayerPlotLimitEvent

java.lang.Object
com.plotsquared.core.events.PlayerPlotLimitEvent

public class PlayerPlotLimitEvent extends Object
Called every time after PlotSquared calculated a players plot limit based on their permission.

May be used to grant a player more plots based on another rank or bought feature.

Since:
7.3.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerPlotLimitEvent(@NonNull PlotPlayer<?> player, @org.checkerframework.checker.index.qual.NonNegative int limit)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @org.checkerframework.checker.index.qual.NonNegative int
    Returns the previous set limit, if none was overridden before this event handler the default limit based on the players permissions node is returned.
    void
    limit(@org.checkerframework.checker.index.qual.NonNegative int limit)
    Overrides the previously calculated or set plot limit for player().
    The player for which the limit is queried.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • limit

      public void limit(@org.checkerframework.checker.index.qual.NonNegative int limit)
      Overrides the previously calculated or set plot limit for player().
      Parameters:
      limit - The amount of plots a player may claim. Must be 0 or greater.
      Since:
      7.3.0
    • limit

      public @org.checkerframework.checker.index.qual.NonNegative int limit()
      Returns the previous set limit, if none was overridden before this event handler the default limit based on the players permissions node is returned.
      Returns:
      The currently defined plot limit of this player.
      Since:
      7.3.0
    • player

      public @NonNull PlotPlayer<?> player()
      The player for which the limit is queried.
      Returns:
      the player.
      Since:
      7.3.0