mirror of
https://github.com/PEXPlugins/Modifyworld.git
synced 2024-11-21 11:26:13 +01:00
Merge pull request #72 from daboross/patch-2
Allow Modifyworld to run without PEX being present
This commit is contained in:
commit
9697e148d3
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user