Catch a ClassNotFoundException when PermissionsEx doesn't exist

I was getting a ClassNotFoundException in this code when using ModifyWorld without PermisisonsEx. This code catches that exception.
This commit is contained in:
Dabo Ross 2013-07-09 20:36:32 -07:00
parent 45661e2c17
commit 904b18c0b7

View File

@ -79,7 +79,12 @@ public class PlayerInformer {
}
public String getMessage(Player player, String permission) {
if (PermissionsEx.isAvailable()) {
boolean permissionsExAvailable = false;
try{
permissionsExAvailable = PermissionsEx.isAvailable();
} catch(ClassNotFoundException ex) {
}
if (permissionsExAvailable) {
PermissionUser user = PermissionsEx.getUser(player);
String message;