MCEconomy API

Public contracts package for MCEconomy. This module is interface-only and is designed to be used as the constant and contract source across the ecosystem.

Version: 2026.0.4-3

Implementation Guidance

Maven (Repository + Authentication + Dependency)

settings.xml (credentials for GitHub Packages)

<servers>
  <server>
    <id>github</id>
    <username>${env.GITHUB_ACTOR}</username>
    <password>${env.GITHUB_TOKEN}</password>
  </server>
</servers>

pom.xml (repo + dependency)

<repositories>
  <repository>
    <id>github</id>
    <url>https://maven.pkg.github.com/MCClauneck/plugin-api</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>io.github.mcclauneck</groupId>
    <artifactId>mceconomy-api</artifactId>
    <version>2026.0.4-3</version>
  </dependency>
</dependencies>

Gradle (Groovy) - Repository + Authentication + Dependency

repositories {
  mavenCentral()
  maven {
    url = uri("https://maven.pkg.github.com/MCClauneck/plugin-api")
    credentials {
      username = System.getenv('GITHUB_ACTOR') ?: System.getenv('AGENT_NAME') ?: System.getenv('USER_GITHUB_NAME')
      password = System.getenv('GITHUB_TOKEN') ?: System.getenv('AGENT_TOKEN') ?: System.getenv('USER_GITHUB_TOKEN')
    }
  }
}

dependencies {
  implementation 'io.github.mcclauneck:mceconomy-api:2026.0.4-3'
}

Gradle (Kotlin) - Repository + Authentication + Dependency

repositories {
  mavenCentral()
  maven {
    url = uri("https://maven.pkg.github.com/MCClauneck/plugin-api")
    credentials {
      username = System.getenv("GITHUB_ACTOR") ?: System.getenv("AGENT_NAME") ?: System.getenv("USER_GITHUB_NAME")
      password = System.getenv("GITHUB_TOKEN") ?: System.getenv("AGENT_TOKEN") ?: System.getenv("USER_GITHUB_TOKEN")
    }
  }
}

dependencies {
  implementation("io.github.mcclauneck:mceconomy-api:2026.0.4-3")
}

Core Contracts Snapshot

CurrencyType enum constants:

COIN, COPPER, SILVER, GOLD

IMCEconomyDB key methods:

long getCoin(String accountUuid, String accountType, CurrencyType coinType)
boolean setCoin(String accountUuid, String accountType, CurrencyType coinType, long amount)
boolean addCoin(String accountUuid, String accountType, CurrencyType coinType, long amount)
boolean minusCoin(String accountUuid, String accountType, CurrencyType coinType, long amount)
boolean sendCoin(String senderUuid, String senderType, String receiverUuid, String receiverType, CurrencyType coinType, long amount)
boolean ensureAccountExist(String accountUuid, String accountType)
void close()