Example #1
0
 @Override
 public List<PermissionOverride> getPermissionOverrides() {
   List<PermissionOverride> overrides = new LinkedList<>();
   overrides.addAll(userPermissionOverrides.values());
   overrides.addAll(rolePermissionOverrides.values());
   return Collections.unmodifiableList(overrides);
 }
Example #2
0
 public static synchronized void stopAll(JDA api) {
   Map<String, AsyncMessageSender> senders = instances.get(api);
   if (senders != null && !senders.isEmpty()) {
     senders
         .values()
         .forEach(
             sender -> {
               sender.kill();
             });
     senders.clear();
   }
 }
Example #3
0
 @Override
 public List<PermissionOverride> getRolePermissionOverrides() {
   return Collections.unmodifiableList(
       new LinkedList<PermissionOverride>(rolePermissionOverrides.values()));
 }