Installing HytaleMetrics is specific for Plugin Developer who want to collect data about the servers active and using your plugins. This is not required if you are a Server Owner, only for Plugin Developers.
- Collects anonymous usage statistics for your plugins
- Privacy-focused with server-side opt-out
- Easy to integrate with Maven
- All data collected is **anonymous**
- Server owners can opt-out at any time
- No personal or identifying information is collected
- Data is used solely for statistics and analytics
- Game version
- Java version
- OS information
- CPU core count
- Player count
- Online mode status
- Plugin Version
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.hytalecore</groupId>
<artifactId>hytalemetrics-plugin</artifactId>
<version>v1.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<relocations>
<relocation>
<pattern>hytalemetricsplugin</pattern>
<!-- Replace [your.plugin.package.metrics] with your plugin's package! -->
<shadedPattern>your.plugin.package.metrics</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
import org.unknown.plugin.java.JavaPlugin;
import hytalemetricsplugin.unknown.Metrics;
public class YourPlugin extends JavaPlugin {
@Override
public void onEnable() {
// Get your plugin ID from https://hytalemetrics.net/plugins
String pluginId = "12345"; // Replace with your actual plugin ID
Metrics metrics = new Metrics(this, pluginId);
}
}
The library creates a config file at `plugins/hytalemetrics-config.yml`:
# HytaleMetrics Configuration # Learn more at: https://hytalemetrics.net # # Set to false to disable metrics collection enabled: true # # Unique server identifier (auto-generated) serverUuid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # # Debug options logFailedRequests: false logDataSent: false logResponseStatus: false
git clone https://github.com/hytalecore/hytalemetrics-plugin.git cd hytalemetrics-plugin mvn clean install