private void dispatchServerChannelChangeOverwrittenPermissionsEvent ( ServerChannel channel , Permissions newPermissions , Permissions oldPermissions , DiscordEntity entity ) { if ( newPermissions . equals ( oldPermissions ) ) { // This can be caused by adding a user/role in a channels overwritten permissions without modifying // any of its values. We don't need to dispatch an event for this. return ; } ServerChannelChangeOverwrittenPermissionsEvent event = new ServerChannelChangeOverwrittenPermissionsEventImpl ( channel , newPermissions , oldPermissions , entity ) ; api . getEventDispatcher ( ) . dispatchServerChannelChangeOverwrittenPermissionsEvent ( ( DispatchQueueSelector ) channel . getServer ( ) , ( entity instanceof Role ) ? ( Role ) entity : null , channel . getServer ( ) , channel , ( entity instanceof User ) ? ( User ) entity : null , event ) ; }
Dispatches a ServerChannelChangeOverwrittenPermissionsEvent .