This package contains one abstract class -- {@link com.programmerdan.minecraft.civspy.listeners.ServerDataListener} which must be the superclass of any Listener implementations you want automatically loaded by CivSpy.
You don't have to implement for both constructors; choose the one that suits your needs.
Listeners can be simple or complex, but I strongly recommend keeping them simple and lightweight, maintaining as little state as possible.




A quick introduction to listeners:

Data Listeners


A Data Listeners should contain one or more @EventListener annotated methods, that generate {@link com.programmerdan.minecraft.civspy.PointDataSample} POJOs.



Requirements


All implementations of DataListener must provide a shutdown implementation. This simple method is a cleanup hook; CivSpy will make every attempt to call shutdown on all listeners during CivSpy de-activation.
All implementations of DataListener must provide a constructor that takes a DataManager, Logger, String, and optionally a ConfigurationSection as input.


Usage


DataSamples are POJOs -- just construct them via their constructor and don't worry about anything else, they just hold and pass along data.
One parameter on all DataSample constructors is "Server" -- you can get the plugin's configured "Server" name via getServer(). Be sure toinclude the server name in your DataListener POJOs -- see the constructors on PointDataSample and PeriodicDataSample. If local or not specified in CivSpy config, this value will be the string literal "local".
When your listener has constructed a DataSample POJO, pass it along to the {@link com.programmerdan.minecraft.civspy.DataListener#record(com.programmerdan.minecraft.civspy.DataSample)} superclass method. This method handles actually alerting the DataManager of the new data to be aggregated or recorded.


That's basically it. Extend ServerDataListener, add some normal Bukkit Listeners, create some DataSamples and pass them along to record().