This plugin does a mass insert (sometimes called a mail-merge).
Why would anyone need a mail-merge in Minecraft?
Well, ever need to duplicate a lot of similar code segments or methods but with a slight difference (such as the event name) between each one?
I recently had to do this -- create a plugin with a crapton of nearly identical event handlers for a bunch of different event names that I copied directly from the Javadocs.
So what does it do, exactly?
Wherever it sees a "$" in the template file, it'll make a copy of that file and replace each "$" with the line from the list file and write that to output, then it'll go to the next line in the list and do the same thing again, and again, and again...
I chose "$" because that's the only character that's not an operator in Java.
Issue /INSERT [LISTFILE] [TEMPLATEFILE] [OUTPUTFILE]
For example, given this as LISTFILE.TXT:
BlockBreakEvent
BlockBurnEvent
BlockDamageEvent
BlockDispenseEvent
BlockExplodeEvent
BlockFadeEvent
BlockFormEvent
BlockFromToEvent
BlockGrowEvent
BlockIgniteEvent
BlockMultiPlaceEvent
BlockPhysicsEvent
BlockPistonEvent
BlockPistonExtendEvent
BlockPistonRetractEvent
BlockPlaceEvent
BlockSpreadEvent
And given is as TEMPLATE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void my$Handler ($ event) {
// TODO put code here...
}
If you issue /INSERT LISTFILE.TXT TEMPLATE.TXT OUTFILE.TXT , you'll get this in OUTFILE.TXT:
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBreakEventHandler (BlockBreakEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockBurnEventHandler (BlockBurnEvent event) {
// TODO put code here...
}
@EventHandler (priority = EventPriority.MONITOR)
public void myBlockDamageEventHandler (BlockDamageEvent event) {
// TODO put code here...
}
etc.
etc.
etc.
All 3 parameters are required.
To install this plugin, copy the plugin JAR file to your server's plugins folder.