MetricCommons is a common library for a self hosted, one plugin, metric system on cloud services (such as AWS). It also provides a interface to all plugins who use it.
Here is a example that sends data to the localhost server at port 3000 and the version of the plugin. (you need to add it as a dependency to your YML, too.)
@Override
public void onEnable() {
getLogger().info("DEBUG MODE ENABLED");
MetricService.sendData("localhost", 3000, this.getDescription().getVersion());
MetricService.endData();
}
The download includes the full package including the networking libraries and the JSON library. Simply, just run the download in a terminal:
Simply input your prefered IP and port, and you have your own self-hosted server. The server includes several commands:
You can also interact with the server via external program to access the server's databanks by using the server's PacketAllData handler and it will send you the FormatContainer as a JSON.
You can also use this for multiple plugins by running the servers on different ports and different threads to allow you to use one system for multiple plugins.
Here is a example that sends data to the localhost server at port 3000 and the version of the plugin. (you need to add it as a dependency to your YML, too.)
Code (Text):
@Override
public void onEnable() {
getLogger().info("DEBUG MODE ENABLED");
MetricService.sendData("localhost", 3000, this.getDescription().getVersion());
MetricService.endData();
}
Code (Text):
java -jar <metricJar>.jar <ip> <port>
- stop - stops the server
- amount - shows how many unique users have ran the plugin on their server
You can also interact with the server via external program to access the server's databanks by using the server's PacketAllData handler and it will send you the FormatContainer as a JSON.
You can also use this for multiple plugins by running the servers on different ports and different threads to allow you to use one system for multiple plugins.
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
MetricCommon is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10. Downloaded 174 times (via Spigot). Download it and open it directly in the game.