Skip to main content

Getting Started

VirtualPlayers comes with an API which can be used by developers. Follow the steps below to useadd the API as a dependency.

Adding the BattlePlugins Repository

You will first need to add the BattlePlugins repository.

Gradle (Kotlin DSL)

repositories {
    maven("https://repo.battleplugins.org/releases")
    maven("https://repo.battleplugins.org/snapshots")
}

Gradle (Groovy)

repositories {
    maven {
        url "https://repo.battleplugins.org/releases"
    }
    maven {
        url "https://repo.battleplugins.org/snapshots"
    }
}

Maven

<repositories>
  <repository>
    <id>battleplugins-releases</id>
    <name>BattlePlugins Releases</name>
    <url>https://repo.battleplugins.org/releases</url>
  </repository>
  <repository>
    <id>battleplugins-snapshots</id>
    <name>BattlePlugins Snapshots</name>
    <url>https://repo.battleplugins.org/snapshots</url>
  </repository>
</repositories>

Adding the Dependency

Gradle (Kotlin DSL)

dependencies {
    compileOnly("org.battleplugins.virtualplayers:api:3.0.0")
}

Gradle (Groovy)

dependencies {
    compileOnly "org.battleplugins.virtualplayers:api:3.0.0"
}

Maven

<dependencies>
  <dependency>
    <groupId>org.battleplugins.virtualplayers</groupId>
    <artifactId>api</artifactId>
    <version>3.0.0</version>
    <scope>provided</scope>
  </dependency>
</dependencies>