Merge pull request #72 from daboross/patch-2

Allow Modifyworld to run without PEX being present
This commit is contained in:
zml2008 2013-07-13 14:20:58 -07:00
commit 9697e148d3

View File

@ -79,6 +79,13 @@ public class PlayerInformer {
}
public String getMessage(Player player, String permission) {
boolean permissionsExExists = true;
try {
Class permissionsExClass = Class.forName("ru.tehkode.permissions.bukkit.PermissionsEx");
} catch (ClassNotFoundException e) {
permissionsExExists = false;
}
if (permissionsExExists) {
if (PermissionsEx.isAvailable()) {
PermissionUser user = PermissionsEx.getUser(player);
@ -103,7 +110,7 @@ public class PlayerInformer {
return message;
}
}
}
return getMessage(permission);
}