question: private String restoreNBTTags ( String str , ArrayList < String > nbttags ) { int nbtidx = 1 ; for ( String capture : nbttags ) { str = str . replace ( "NBT" + nbtidx ++ , capture ) ; } return str ; }
target:  And the reverse, restore the glorious NBT tags into a string loaded with their placeholders