Source:
<code>public void start() throws Exception { System.setProperty( "io.netty.selectorAutoRebuildThreshold", "0" ); if ( System.getProperty( "io.netty.leakDetectionLevel" ) == null ) { ResourceLeakDetector.setLevel( ResourceLeakDetector.Level.DISABLED ); } eventLoops = PipelineUtils.newEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); File moduleDirectory = new File( "modules" ); moduleManager.load( this, moduleDirectory ); pluginManager.detectPlugins( moduleDirectory ); pluginsFolder.mkdir(); pluginManager.detectPlugins( pluginsFolder ); pluginManager.loadPlugins(); config.load(); if ( config.isForgeSupport() ) { registerChannel( ForgeConstants.FML_TAG ); registerChannel( ForgeConstants.FML_HANDSHAKE_TAG ); registerChannel( ForgeConstants.FORGE_REGISTER ); getLogger().warning( "MinecraftForge support is currently unmaintained and may have unresolved issues. Please use at your own risk." ); } isRunning = true; pluginManager.enablePlugins(); if ( config.getThrottle() > 0 ) { connectionThrottle = new ConnectionThrottle( config.getThrottle(), config.getThrottleLimit() ); } startListeners(); saveThread.scheduleAtFixedRate( new TimerTask() { @Override public void run() { if ( getReconnectHandler() != null ) { getReconnectHandler().save(); } } }, 0, TimeUnit.MINUTES.toMillis( 5 ) ); metricsThread.scheduleAtFixedRate( new Metrics(), 0, TimeUnit.MINUTES.toMillis( Metrics.PING_INTERVAL ) ); <START> Runtime.getRuntime().addShutdownHook( new Thread( new Runnable() <END> { @Override public void run() { if ( isRunning ) { independantThreadStop( getTranslation( "restart" ) ); } } } ) ); }</code><technical_language>need for runnable, override methods in thread</technical_language>

Target:
public void start() throws Exception { System.setProperty( "io.netty.selectorAutoRebuildThreshold", "0" ); if ( System.getProperty( "io.netty.leakDetectionLevel" ) == null ) { ResourceLeakDetector.setLevel( ResourceLeakDetector.Level.DISABLED ); } eventLoops = PipelineUtils.newEventLoopGroup( 0, new ThreadFactoryBuilder().setNameFormat( "Netty IO Thread #%1$d" ).build() ); File moduleDirectory = new File( "modules" ); moduleManager.load( this, moduleDirectory ); pluginManager.detectPlugins( moduleDirectory ); pluginsFolder.mkdir(); pluginManager.detectPlugins( pluginsFolder ); pluginManager.loadPlugins(); config.load(); if ( config.isForgeSupport() ) { registerChannel( ForgeConstants.FML_TAG ); registerChannel( ForgeConstants.FML_HANDSHAKE_TAG ); registerChannel( ForgeConstants.FORGE_REGISTER ); getLogger().warning( "MinecraftForge support is currently unmaintained and may have unresolved issues. Please use at your own risk." ); } isRunning = true; pluginManager.enablePlugins(); if ( config.getThrottle() > 0 ) { connectionThrottle = new ConnectionThrottle( config.getThrottle(), config.getThrottleLimit() ); } startListeners(); saveThread.scheduleAtFixedRate( new TimerTask() { @Override public void run() { if ( getReconnectHandler() != null ) { getReconnectHandler().save(); } } }, 0, TimeUnit.MINUTES.toMillis( 5 ) ); metricsThread.scheduleAtFixedRate( new Metrics(), 0, TimeUnit.MINUTES.toMillis( Metrics.PING_INTERVAL ) ); Runtime.getRuntime().addShutdownHook( new Thread() { @Override public void run() { independentThreadStop( getTranslation( "restart" ), false ); } } ); }