Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean apply() {
- try {
- lock.lock();
- Player player = getPlayer();
- if (player == null) return false;
- permissionAttachment = player.addAttachment(instance);
- for (Map.Entry<String, Boolean> effectivePerm : getEffectivePermissions().entrySet()) {
- permissionAttachment.setPermission(effectivePerm.getKey(), effectivePerm.getValue());
- }
- return true;
- } catch (Exception ex) {
- ex.printStackTrace();
- return false;
- } finally {
- lock.unlock();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment