@Override public List<Permission> getDenied() { return Collections.unmodifiableList(Permission.getPermissions(deny)); }
/** * Immutable list of {@link net.dv8tion.jda.core.Permission Permissions} * that would be <b>granted</b> by the PermissionOverride that is created by this action. * * @return immutable list of granted {@link net.dv8tion.jda.core.Permission Permissions} */ public List<Permission> getAllowedPermissions() { return Collections.unmodifiableList(Permission.getPermissions(allow)); }
@Override public List<Permission> getPermissions() { return Collections.unmodifiableList( Permission.getPermissions(rawPermissions)); }
@Override public List<Permission> getAllowed() { return Collections.unmodifiableList(Permission.getPermissions(allow)); }
/** * Immutable list of {@link net.dv8tion.jda.core.Permission Permissions} * that would be <b>denied</b> by the PermissionOverride that is created by this action. * * @return immutable list of denied {@link net.dv8tion.jda.core.Permission Permissions} */ public List<Permission> getDeniedPermissions() { return Collections.unmodifiableList(Permission.getPermissions(deny)); }
@Override public List<Permission> getPermissions() { return Collections.unmodifiableList( Permission.getPermissions( PermissionUtil.getEffectivePermission(this))); }
@Override public List<Permission> getInherit() { return Collections.unmodifiableList(Permission.getPermissions(getInheritRaw())); }
/** * Immutable list of {@link net.dv8tion.jda.core.Permission Permissions} * that would be <b>inherited</b> from other permission holders. * <br>Permissions returned are not explicitly granted or denied! * * @return immutable list of inherited {@link net.dv8tion.jda.core.Permission Permissions} * * @see #getInherited() */ public List<Permission> getInheritedPermissions() { return Collections.unmodifiableList(Permission.getPermissions(getInherited())); }
public RoleUpdatePermissionsEvent(JDA api, long responseNumber, Role role, long oldPermissionsRaw) { super(api, responseNumber, role, Permission.getPermissions(oldPermissionsRaw), role.getPermissions(), IDENTIFIER); this.oldPermissionsRaw = oldPermissionsRaw; this.newPermissionsRaw = role.getPermissionsRaw(); }
@Override public List<Permission> getPermissions(Channel channel) { if (!getGuild().equals(channel.getGuild())) throw new IllegalArgumentException("Provided channel is not in the same guild as this member!"); return Collections.unmodifiableList( Permission.getPermissions( PermissionUtil.getEffectivePermission(channel, this))); }
List<Permission> permissionList = Permission.getPermissions(missingPerms); if (!permissionList.isEmpty()) throw new InsufficientPermissionException(permissionList.get(0));
/** * Checks if the given permission value includes the raw embed permission value. * * @param permissions The permission value that should be checked. * @return <code>True</code> if the given raw permission value includes * the embed permissions, <code>False</code> otherwise. */ private static boolean checkForRawEmbedPermission(long permissions) { for (Permission permission : Permission.getPermissions(permissions)) { if (permission.getRawValue() == 0x00004000) { return true; } } return false; }
AuditLogChange change = changes.get("permissions"); Map<Boolean, List<Permission>> permChanges = GeneralUtils.getChanged( Permission.getPermissions(((Integer) change.getOldValue()).longValue()), Permission.getPermissions(((Integer) change.getNewValue()).longValue())); if (permChanges.get(true).size() > 0) { StringBuilder added = new StringBuilder();