Package com.plotsquared.core.events
Class PlayerPlotLimitEvent
java.lang.Object
com.plotsquared.core.events.PlayerPlotLimitEvent
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
ConstructorDescriptionPlayerPlotLimitEvent
(@NonNull PlotPlayer<?> player, @org.checkerframework.checker.index.qual.NonNegative int limit) -
Method Summary
Modifier and TypeMethodDescription@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.void
limit
(@org.checkerframework.checker.index.qual.NonNegative int limit) Overrides the previously calculated or set plot limit forplayer()
.player()
The player for which the limit is queried.
-
Constructor Details
-
PlayerPlotLimitEvent
public PlayerPlotLimitEvent(@NonNull PlotPlayer<?> player, @org.checkerframework.checker.index.qual.NonNegative int limit)
-
-
Method Details
-
limit
Overrides the previously calculated or set plot limit forplayer()
.- Parameters:
limit
- The amount of plots a player may claim. Must be0
or greater.- Since:
- 7.3.0
-
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
The player for which the limit is queried.- Returns:
- the player.
- Since:
- 7.3.0
-