https://github.com/devsrsouza/bukkript
Bukkript is a custom Kotlin Scripting Definition for customizing Minecraft Bukkit servers
https://github.com/devsrsouza/bukkript
bukkit bukkit-plugin kotlin kotlin-scripting minecraft scripting
Last synced: about 1 year ago
JSON representation
Bukkript is a custom Kotlin Scripting Definition for customizing Minecraft Bukkit servers
- Host: GitHub
- URL: https://github.com/devsrsouza/bukkript
- Owner: DevSrSouza
- License: mit
- Created: 2018-04-07T17:56:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T02:47:34.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T03:44:33.785Z (over 1 year ago)
- Topics: bukkit, bukkit-plugin, kotlin, kotlin-scripting, minecraft, scripting
- Language: Kotlin
- Homepage:
- Size: 665 KB
- Stars: 76
- Watchers: 1
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## Bukkript
**Buk**kit **K**otlin Sc**ript**

[](https://github.com/DevSrSouza/Bukkript/stargazers)
[](https://github.com/DevSrSouza/Bukkript/issues)
[](https://github.com/DevSrSouza/Bukkript/commit)
[](https://choosealicense.com/licenses/mit)
[](http://jenkins.devsrsouza.com.br/job/Bukkript/)
Bukkript is a Bukkit plugin that allows server admins to customize their server easily with the power of **Kotlin** language and [**KotlinBukkitAPI**](https://github.com/DevSrSouza/KotlinBukkitAPI/).
### Contents:
* [Documentation](https://github.com/DevSrSouza/Bukkript/wiki/)
* [Features](#Features)
* [Issue reporting](https://github.com/DevSrSouza/Bukkript/issues)
* [Dev builds (download)](http://jenkins.devsrsouza.com.br/job/Bukkript/)
* [Consider donate](#Consider-donate)
### Features
* Implicit imports for KotlinBukkitAPI, Bukkit, Kotlin Coroutines
* Compilation cache
* [Hot Recompilation](#Hot-recompilation)
* Per script logging with per script log file.
* In game commands
* Additional dependencies by using `@file:Maven("DEPENDENCY")` and `@file:MavenRepository("REPOSITORY URL")`
* IntelliJ Support with [KotlinBukkitAPI Tooling](https://github.com/DevSrSouza/KotlinBukkitAPI-Tooling)
More about the usage at the [Documentation](https://github.com/DevSrSouza/Bukkript/wiki/).
## Installation and Development
* Download [Bukkript](http://jenkins.devsrsouza.com.br/job/Bukkript/) and [KotlinBukkitAPI](http://jenkins.devsrsouza.com.br/job/KotlinBukkitAPI/)
* Put it in your server Plugin folder.
* Download the IntelliJ (recommendation is to download it by the app [Jetbrains Toolbox](https://www.jetbrains.com/pt-br/toolbox-app/))
* In IntelliJ, go to Setting->Plugins->Marketplace
* Download [KotlinBukkitAPI Tooling](https://plugins.jetbrains.com/plugin/14913-kotlinbukkitapi-tooling)
* Open your server folder
* Run the server to create the folder plugin/Bukkript/scripts or just create it in the IntelliJ
* In IntelliJ right click in the `scripts` folder and New->Bukkript Script
* Develop it \o/
### Example Script
Creating a new command that sends `Hello Script World!`
`test.bk.kts`
```kotlin
command("scripttest") {
executor {
sender.msg("Hello Script World!")
}
}
```
Script with the usage of [Jetbrains Exposed](https://github.com/JetBrains/Exposed/)
`with-dependency.bk.kts`
```kotlin
@file:Maven("org.jetbrains.exposed:exposed-core:0.24.1")
@file:Maven("org.jetbrains.exposed:exposed-dao:0.24.1")
@file:Maven("org.jetbrains.exposed:exposed-jdbc:0.24.1")
@file:Maven("org.jetbrains.exposed:exposed-java-time:0.24.1")
val sqlConfig = DatabaseTypeConfig(
database = "test-server",
hostname = "localhost",
user = "root",
password = "12345",
port = 3306,
type = "h2"
)
object MarketTable : IntIdTable("bk-market") {
val seller = offlinePlayer("seller")
val item = text("item")
val price = double("price")
val postDate = datetime("post_date")
val isSold = bool("is_sold").default(false)
val costumer = offlinePlayer("costumer").nullable()
val soldTime = datetime("sold_time").nullable()
}
val dataSource = databaseTypeFrom(plugin.dataFolder, sqlConfig).dataSource()
val database = Database.connect(dataSource)
transaction(database) {
SchemaUtils.create(MarketTable)
}
```
[](https://github.com/DevSrSouza/KotlinBukkitAPI-Tooling)
## Hot recompilation

## Credits
- [Kotlin](https://kotlinlang.org/) by Jetbrains
- [Shadow plugin](https://github.com/johnrengelman/shadow) by johnrengelman
- [Plugin Dependency Manager](https://github.com/knightzmc/pdm) by knightzmc
## Consider donate
