Sign In

Java SDK

Build custom integrations with your Minecraft plugins. The Analyse SDK gives you programmatic access to event tracking, A/B testing, and session management.

Why Use the SDK?

The Analyse plugin handles basic analytics automatically. Use the SDK when you want to:

  • Track custom events — Crate opens, quest completions, PvP kills
  • Run A/B tests — Show different experiences to different players
  • Access session data — Get player hostnames, join times, session IDs
  • Build advanced integrations — Create automated workflows based on analytics

Quick Example

import net.analyse.api.Analyse;
// Track a custom event
Analyse.trackEvent("crate_opened")
.withPlayer(player.getUniqueId(), player.getName())
.withData("crate_type", "legendary")
.withData("reward", "diamond_sword")
.send();
// A/B test different rewards
String variant = Analyse.getVariant(player.getUniqueId(), "crate-rewards");
if ("boosted".equals(variant)) {
giveDoubleRewards(player);
}

Requirements

  • Java 17+
  • Analyse plugin installed and configured on the server
  • Paper, Velocity, or BungeeCord server

Getting Started

StepDescription
InstallationAdd the SDK to your project
Event TrackingTrack custom player actions
A/B TestingRun experiments in your plugin
SessionsAccess player session data
Plugin MessagingSend events through your proxy
API ReferenceComplete method reference

Package Structure

net.analyse.api
├── Analyse # Main entry point (static methods)
├── manager/
│ ├── ABTestManager # A/B test operations
│ └── SessionManager # Player session access
├── messaging/
│ ├── AnalyseMessaging # Send events via plugin messages
│ └── AnalyseMessageParser # Parse incoming messages (proxy-side)
├── object/
│ ├── abtest/
│ │ ├── ABTest # Test configuration
│ │ └── Variant # Test variant
│ └── builder/
│ └── EventBuilder # Fluent event builder
└── session/
└── PlayerSession # Session data interface