Getting Started

In order to use MockBukkit, you first have to integrate it into your build tool. You will also need to know which version of MockBukkit to use. MockBukkit version numbering can be a little bit confusing. The most important thing to remember is that each version of MockBukkit is named after the version of Bukkit it implements, followed by the version number of MockBukkit itself.

For instance: MockBukkit-v1.15 v0.3.0 is the 0.3.0 release of MockBukkit, targetting plugins build for Minecraft 1.15. The latest stable version can always be found at


If you are using Gradle, you will need to setup your build.gradle file to enable unit testing.


To enable unit testing, all you need to do is add the JUnit dependency and the correct MockBukkit dependency. Here is an example which adds support for JUnit 4.12 and MockBukkit-v1.15:

repositories {

dependencies {
    testImplementation 'junit:junit:4.12'
    testImplementation 'com.github.seeseemelk:MockBukkit-v1.15:0.3.0-SNAPSHOT'


When this has been added, you can run your tests using the test task. For Windows, running the following command will execute the tests:

gradlew.bat test

On Linux and macOS, use the following command:

./gradlew test


For people that use Maven instead of Gradle can also use MockBukkit by adding it to their pom.xml. To do so, both JUnit and MockBukkit habe to be added to your dependencies:

    <!-- Add your other dependencies here -->



After having modified your pom.xml, you can run the unit tests as follows:

mvn test