aaomidi

Untitled

Dec 31st, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public boolean apply() {
  2. try {
  3. lock.lock();
  4. Player player = getPlayer();
  5. if (player == null) return false;
  6.  
  7. permissionAttachment = player.addAttachment(instance);
  8. for (Map.Entry<String, Boolean> effectivePerm : getEffectivePermissions().entrySet()) {
  9. permissionAttachment.setPermission(effectivePerm.getKey(), effectivePerm.getValue());
  10. }
  11. return true;
  12. } catch (Exception ex) {
  13. ex.printStackTrace();
  14. return false;
  15. } finally {
  16. lock.unlock();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment