aaomidi icon

Untitled

aaomidi | PRO | 12/31/15 06:30:45 PM UTC | 0 ⭐ | 198 👁️ | Never ⏰ | []
text |

620 B

|

None

|

0 👍

/

0 👎

    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();
        }
    }

Comments