Package com.plotsquared.core.permissions
Interface PermissionHolder
- All Known Subinterfaces:
OfflinePlotPlayer
- All Known Implementing Classes:
ConsolePlayer
,PlotPlayer
public interface PermissionHolder
Any object which can hold permissions
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
hasKeyedPermission
(@NonNull String permission, @NonNull String key) Check if the owner of the profile has a given (global) keyed permission.boolean
Check if the owner of the profile has a given keyed permission.default boolean
hasPermission
(@NonNull Permission permission) Check if the owner of the profile has a given (global) permissiondefault boolean
hasPermission
(@NonNull Permission permission, boolean notify) Checks if the owner of the profile has a permission, and optionally send the no permission message if applicable.default boolean
hasPermission
(@NonNull String permission) Check if the owner of the profile has a given (global) permissionboolean
hasPermission
(@NonNull String permission, boolean notify) Checks if the owner of the profile has a permission, and optionally send the no permission message if applicable.boolean
hasPermission
(@Nullable String world, @NonNull String permission) Check if the owner of the profile has a given permissiondefault @org.checkerframework.checker.index.qual.NonNegative int
hasPermissionRange
(@NonNull Permission stub, @org.checkerframework.checker.index.qual.NonNegative int range) Check the highest permission a PlotPlayer has within a specified range.
- Excessively high values will lag
- The default range that is checked isSettings.Limit.MAX_PLOTS
default @org.checkerframework.checker.index.qual.NonNegative int
hasPermissionRange
(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range) Check the highest permission a PlotPlayer has within a specified range.
- Excessively high values will lag
- The default range that is checked isSettings.Limit.MAX_PLOTS
-
Method Details
-
hasPermission
Check if the owner of the profile has a given (global) permission- Parameters:
permission
- Permission- Returns:
true
if the owner has the given permission, elsefalse
-
hasPermission
Check if the owner of the profile has a given (global) permission- Parameters:
permission
- Permission- Returns:
true
if the owner has the given permission, elsefalse
-
hasKeyedPermission
Check if the owner of the profile has a given (global) keyed permission. Checks bothpermission.key
andpermission.*
- Parameters:
permission
- Permissionkey
- Permission "key"- Returns:
true
if the owner has the given permission, elsefalse
- Since:
- 6.0.10
-
hasPermissionRange
default @org.checkerframework.checker.index.qual.NonNegative int hasPermissionRange(@NonNull Permission stub, @org.checkerframework.checker.index.qual.NonNegative int range) Check the highest permission a PlotPlayer has within a specified range.
- Excessively high values will lag
- The default range that is checked isSettings.Limit.MAX_PLOTS
- Parameters:
stub
- The permission stub to check e.g. for `plots.plot.#` the stub is `plots.plot`range
- The range to check- Returns:
- The highest permission they have within that range
-
hasPermissionRange
default @org.checkerframework.checker.index.qual.NonNegative int hasPermissionRange(@NonNull String stub, @org.checkerframework.checker.index.qual.NonNegative int range) Check the highest permission a PlotPlayer has within a specified range.
- Excessively high values will lag
- The default range that is checked isSettings.Limit.MAX_PLOTS
- Parameters:
stub
- The permission stub to check e.g. for `plots.plot.#` the stub is `plots.plot`range
- The range to check- Returns:
- The highest permission they have within that range
-
hasPermission
Checks if the owner of the profile has a permission, and optionally send the no permission message if applicable.- Parameters:
permission
- Permissionnotify
- If to notify the permission holder- Returns:
true
if the owner has the given permission, elsefalse
-
hasPermission
Checks if the owner of the profile has a permission, and optionally send the no permission message if applicable.- Parameters:
permission
- Permissionnotify
- If to notify the permission holder- Returns:
true
if the owner has the given permission, elsefalse
-
hasPermission
Check if the owner of the profile has a given permission- Parameters:
world
- World namepermission
- Permission- Returns:
true
if the owner has the given permission, elsefalse
-
hasKeyedPermission
Check if the owner of the profile has a given keyed permission. Checks bothpermission.key
andpermission.*
- Parameters:
world
- World namepermission
- Permissionkey
- Permission "key"- Returns:
true
if the owner has the given permission, elsefalse
- Since:
- 6.0.10
-