Getting Started
In this page, we will be going over how to get started with your BulletMC server and how to set up your development environment. There are a few prerequisests needed before starting though, these include:
Basic kotlin knowledge
IntelliJ IDEA
Knowledge of minecraft servers in general
With that out of the way, you will first want to download the latest release on github. Currently when writing this article, there are currently no releases. If that is the case for you, simply clone the repository and run ./gradlew build
. All of the next steps will be the same regardless, I'll update this page once BulletMC has officially released.
Now that you have the BulletMC jar file, create a new kotlin project in intellij using gradle. Next you will need to create a directory in your project roots folder named /libs
, you'll proceed to place the "bullet.jar" file in here.
Next going into build.gradle.kts
, you will need to add this line to your dependencies, make sure this path is where your bullet.jar file is. Don't forget to refresh gradle after this!
implementation(files("libs/bullet.jar"))
Next, wherever your main class is, you're going to want to remove everything in there and put the following code in
import com.aznos.api.Plugin
class TestPlugin : Plugin {
override fun getName(): String {
return "TestPlugin"
}
override fun onDisable() {
}
override fun onEnable() {
}
}
For this, you need to make sure of a few things.
1) You are using the "Plugin" interface from com.aznos.api
2) You don't have a fun main() { }, in this situtation this is not needed
Next for bullet to actually recognize your plugin and not skip it when the server loads, you will need a plugin.json
file. If you have ever worked with a server framework like spigot or paper before, this is almost identical to the plugin.yml
file. You'll want to place this plugin.json file into your resources
folder
{
"name": "TestPlugin",
"mainClass": "com.aznos.TestPlugin", //Your main class
"bulletVersion": "PREALPHA-0.0.1" //Whatever version you downloaded the .jar from
}
It's important to note here, if the bulletVersion does not match up with the version running on the server, you will receive in error however the server will still run.
You've done all of the plugin setup so far, the next step is to build this plugin into a .jar file. You can then proceed to go back to the built bullet.jar file, and run java -jar bullet.jar
and run your server. Remember to place your newly built plugin in the generated plugins folder!
By default your server will run on 0.0.0.0:25565
, however this can be changed with the --address
and --port
parameters, see --help
for more information
Before we leave this quick getting started guide, it's important to note that you should never directly modify the internal code of the Bullet server. While this is optional incase there is something you want to that isn't available with plugins yet, or you need fine grain control, it's generally not recommended as it's very easy to break something, and you should instead try to do it all in a plugin.
It's also important to note that things will change overtime, this server framework is very new and hasn't matured yet.
Last updated