@ Override public void eventFired ( EventModel event ) { if ( event . containsDescriptor ( SoundIDs . StartRequest . descriptor ) ) { Identification identification = event . getListResourceContainer ( ) . provideResource ( "izou.common.resource.selector" ) . stream ( ) . map ( ResourceModel :: getResource ) . filter ( resource -> resource instanceof Identification ) . map ( resource -> ( Identification ) resource ) . findFirst ( ) . orElseGet ( event :: getSource ) ; AddOnModel addonModel = getMain ( ) . getAddOnInformationManager ( ) . getAddonModel ( identification ) ; if ( addonModel != null ) { requestPermanent ( addonModel , event . getSource ( ) , event . containsDescriptor ( SoundIDs . StartEvent . isUsingNonJava ) ) ; } } else if ( event . containsDescriptor ( SoundIDs . StartEvent . descriptor ) ) { checkAndUpdateIdentification ( event . getSource ( ) ) ; } else { Identification identification = event . getListResourceContainer ( ) . provideResource ( "izou.common.resource.selector" ) . stream ( ) . map ( ResourceModel :: getResource ) . filter ( resource -> resource instanceof Identification ) . map ( resource -> ( Identification ) resource ) . findFirst ( ) . orElseGet ( event :: getSource ) ; AddOnModel addonModel = getMain ( ) . getAddOnInformationManager ( ) . getAddonModel ( identification ) ; if ( addonModel != null ) { endPermanent ( addonModel ) ; } } }
Invoked when an activator - event occurs .