Package com.plotsquared.core.util
Class Permissions
java.lang.Object
com.plotsquared.core.util.Permissions
Deprecated, for removal: This API element is subject to removal in a future version.
all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed
classes
The Permissions class handles checking user permissions.
- This will respect * nodes and plots.admin and can be used to check permission ranges (e.g. plots.plot.5)
- Checking the PlotPlayer class directly will not take the above into account
- This will respect * nodes and plots.admin and can be used to check permission ranges (e.g. plots.plot.5)
- Checking the PlotPlayer class directly will not take the above into account
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasKeyedPermission(@NonNull PermissionHolder caller, @NonNull String permission, @NonNull String key) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static booleanhasPermission(@NonNull PermissionHolder caller, @NonNull Permission permission) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static booleanhasPermission(@NonNull PermissionHolder caller, @NonNull String permission) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static booleanhasPermission(PlotPlayer<?> player, Permission permission, boolean notify) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static booleanhasPermission(PlotPlayer<?> player, String permission, boolean notify) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static inthasPermissionRange(PlotPlayer<?> player, Permission Permission, int range) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.static inthasPermissionRange(PlotPlayer<?> player, String stub, int range) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere.
-
Constructor Details
-
Permissions
public Permissions()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
hasPermission
@Deprecated(forRemoval=true, since="6.9.3") public static boolean hasPermission(PlotPlayer<?> player, Permission permission, boolean notify) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePlotPlayer.hasPermission(String, boolean) -
hasPermission
@Deprecated(forRemoval=true, since="6.9.3") public static boolean hasPermission(@NonNull PermissionHolder caller, @NonNull Permission permission) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePermissionHolder.hasPermission(Permission)Check if the owner of the profile has a given (global) permission- Parameters:
caller- permission holderpermission- Permission- Returns:
trueif the owner has the given permission, elsefalse
-
hasPermission
@Deprecated(forRemoval=true, since="6.9.3") public static boolean hasPermission(@NonNull PermissionHolder caller, @NonNull String permission) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePermissionHolder.hasPermission(String)Check if the owner of the profile has a given (global) permission. There is no guarantee that per-world permissions will be checked because unmaintained crap plugins like PEX exist.- Parameters:
caller- permission holderpermission- Permission- Returns:
trueif the owner has the given permission, elsefalse
-
hasKeyedPermission
@Deprecated(forRemoval=true, since="6.9.3") public static boolean hasKeyedPermission(@NonNull PermissionHolder caller, @NonNull String permission, @NonNull String key) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePermissionHolder.hasKeyedPermission(String, String)Check if the owner of the profile has a given (global) keyed permission. Checks bothpermission.keyandpermission.*- Parameters:
caller- permission holderpermission- Permissionkey- Permission "key"- Returns:
trueif the owner has the given permission, elsefalse- Since:
- 6.0.10
-
hasPermission
@Deprecated(forRemoval=true, since="6.9.3") public static boolean hasPermission(PlotPlayer<?> player, String permission, boolean notify) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePlotPlayer.hasPermission(String, boolean)Checks if a PlotPlayer has a permission, and optionally send the no permission message if applicable.- Parameters:
player- permission holderpermission- permissionnotify- if to notify the permission holder- Returns:
- if permission is had
-
hasPermissionRange
@Deprecated(forRemoval=true, since="6.9.3") public static int hasPermissionRange(PlotPlayer<?> player, Permission Permission, int range) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePermissionHolder.hasPermissionRange(Permission, int) -
hasPermissionRange
@Deprecated(forRemoval=true, since="6.9.3") public static int hasPermissionRange(PlotPlayer<?> player, String stub, int range) Deprecated, for removal: This API element is subject to removal in a future version.all logic that may once have been in the class lives elsewhere. We also want to do away with statically-accessed classes. UsePermissionHolder.hasPermissionRange(String, int)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:
player- Player to check forstub- 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
-