private void handleVolume ( EventModel eventModel , ResourceModel < String > resourceModel ) { Optional < Volume > volumeResource = VolumeResource . getVolume ( eventModel ) ; if ( ! volumeResource . isPresent ( ) ) { musicHelper . playerError ( PlayerError . ERROR_ILLEGAL + "command: " + resourceModel . getResource ( ) + "missing resource" , resourceModel . getProvider ( ) ) ; } changeVolume . accept ( volumeResource . get ( ) ) ; }
handles the volume - command