Commits
md_5 authored b2737c28baa
348 348 | System.out.println( "Applying CraftBukkit Patches" ); |
349 349 | File nmsDir = new File( craftBukkit, "src/main/java/net" ); |
350 350 | if ( nmsDir.exists() ) |
351 351 | { |
352 352 | System.out.println( "Backing up NMS dir" ); |
353 353 | FileUtils.moveDirectory( nmsDir, new File( workDir, "nms.old." + System.currentTimeMillis() ) ); |
354 354 | } |
355 355 | File patchDir = new File( craftBukkit, "nms-patches" ); |
356 356 | for ( File file : patchDir.listFiles() ) |
357 357 | { |
358 + | if ( !file.getName().endsWith( ".patch" ) ) |
359 + | { |
360 + | continue; |
361 + | } |
362 + | |
358 363 | String targetFile = "net/minecraft/server/" + file.getName().replaceAll( ".patch", ".java" ); |
359 364 | |
360 365 | File clean = new File( decompileDir, targetFile ); |
361 366 | File t = new File( nmsDir.getParentFile(), targetFile ); |
362 367 | t.getParentFile().mkdirs(); |
363 368 | |
364 369 | System.out.println( "Patching with " + file.getName() ); |
365 370 | |
366 371 | List<String> readFile = Files.readLines( file, Charsets.UTF_8 ); |
367 372 | |