Skip to content

Repository files navigation

Analyse Addons

The source repository for the official Analyse addons — plug-in integrations that teach Analyse about events coming from other plugins (shop sales, votes, point transactions, and so on).

Analyse is the analytics platform purpose-built for Minecraft and Hytale servers. The main plugin lives in track/analyse-java. This repository is the home of the first-party addons that ship alongside it.

Available addons

AddonPlugin it hooksEvents tracked
ShopGUIPlusShopGUIPlusshopguiplus.purchase, shopguiplus.sell, shopguiplus.sell_all
VotifierNuVotifiervotifier.vote
PlayerPointsPlayerPointsplayerpoints.give, playerpoints.take, playerpoints.reset

Getting started

  1. Install the Analyse plugin (v1.0.0 or newer) and configure your API key.
  2. Download the addon jar(s) you want from the releases page.
  3. Drop them in plugins/Analyse/addons/.
  4. Start the server once so the addon config generates, or run /analyse reload.
  5. Edit plugins/Analyse/addons/<addon>/config.yml if you want to tweak what gets tracked.

Requirements

  • Analyse plugin 1.0.0+
  • Java 21 or higher
  • Paper / Spigot / Purpur / Folia 1.21.4+ (or a compatible fork)
  • The corresponding third-party plugin for each addon (ShopGUIPlus, NuVotifier, PlayerPoints, etc.)

Configuration

Each addon has its own config under:

plugins/Analyse/addons/<addon>/config.yml

The file is generated on first load. Use /analyse reload to pick up changes without restarting.

ShopGUIPlus

debug: falsetracking:
# Which transaction results to trackresults:
- SUCCESS# - FAIL# - NOT_ENOUGH_MONEY# - NOT_ENOUGH_SPACE# - NOT_ENOUGH_ITEMS# Which shop actions to trackactions:
- BUY
- SELL
- SELL_ALL

Votifier

debug: falsetracking:
# Only track specific voting services (empty = all)services: []include_service: trueinclude_address: false # privacy consideration, off by defaultinclude_timestamp: true

PlayerPoints

debug: falsetracking:
track_changes: true # give / taketrack_resets: true # resetsminimum_change: 0# filter tiny changesinclude_change_type: true

Building from source

./gradlew clean build

Per-addon builds:

./gradlew :modules:shopguiplus:build
./gradlew :modules:votifier:build
./gradlew :modules:playerpoints:build

Output jars land in modules/<addon>/build/libs/analyse-addon-<addon>-<version>.jar.

The scripts/release.sh script builds every addon and bundles the jars into a single analyse-addons-<version>.zip archive.

Creating a new addon

  1. Create a module folder:

    mkdir -p modules/myaddon/src/main/java/net/analyse/addon/myaddon
    mkdir -p modules/myaddon/src/main/resources
  2. Create modules/myaddon/build.gradle:

    plugins {
    id 'java'
    }
    dependencies {
    compileOnly "io.papermc.paper:paper-api:${project.property('paperVersion')}"// Add the third-party plugin's API dependency here
    }
    jar {
    archiveBaseName.set('analyse-addon-myaddon')
    }
  3. Create your addon class with the @AddonInfo annotation:

    packagenet.analyse.addon.myaddon;
    importnet.analyse.api.addon.Addon;
    importnet.analyse.api.addon.AddonInfo;
    importnet.analyse.api.addon.AddonLogger;
    importnet.analyse.api.platform.AnalysePlatform;
    importjava.nio.file.Path;
    @AddonInfo(
    id = "myaddon",
    name = "My Addon",
    version = "1.0.0",
    author = "YourName",
    description = "Description of what this addon tracks"
    )
    publicclassMyAddonimplementsAddon {
    // ...
    }
  4. The module is auto-discovered by settings.gradle. Just run ./gradlew build.

Addon lifecycle

publicclassMyAddonimplementsAddon {
@OverridepublicvoidonLoad(AnalysePlatformplatform, AddonLoggerlogger, PathdataFolder) {
// Store references
}
@OverridepublicvoidonEnable() {
// Register listeners, open resources
}
@OverridepublicvoidonDisable() {
// Clean up
}
@OverridepublicvoidonReload() {
// Reload config on /analyse reload
}
}

Tracking events

Analyse.trackEvent("myaddon.event_name")
.withPlayer(player.getUniqueId(), player.getName())
.withValue(123.45) // optional numeric value
.withData("key", "value") // optional extra fields
.send();

Project structure

addons/
├── .cursor/rules/ # Java style guide + commit rules
├── .github/ # CI, release, issue / PR templates, Dependabot
├── modules/ # Addon modules (auto-discovered)
│ ├── shopguiplus/
│ ├── votifier/
│ └── playerpoints/
├── scripts/release.sh # Local release bundler
├── build.gradle # Root build
├── settings.gradle # Module discovery
└── gradle.properties # Shared properties

Documentation

Support

License

Copyright © VertCode Development E.E. All rights reserved.

The source in this repository is published for transparency and reference. It is not open source; copying, modifying, redistributing, or running modified builds is not permitted. See LICENSE for the full terms.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages