Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Commit

Permalink
Add a better error message for null permissions being checked
Browse files Browse the repository at this point in the history
  • Loading branch information
zml committed Sep 3, 2014
1 parent 69b4f71 commit 905f168
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package ru.tehkode.permissions.bukkit.regexperms;

import org.apache.commons.lang.Validate;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permissible;
import org.bukkit.permissions.PermissibleBase;
Expand Down Expand Up @@ -223,6 +224,7 @@ private PermissionCheckResult checkSingle(String expression, String permission,

protected PermissionCheckResult permissionValue(String permission) {
try {
Validate.notNull(permission, "Permissions being checked must not be null!");
permission = permission.toLowerCase();
PermissionCheckResult res = cache.get(permission);
if (res != null) {
Expand Down

0 comments on commit 905f168

Please sign in to comment.