mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-21 11:26:13 +01:00
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:
parent
45661e2c17
commit
904b18c0b7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user