Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 2 months 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-27T02:47:34.000Z (over 1 year ago)
- Last Synced: 2024-10-12T03:44:33.785Z (2 months 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**![Kotlin version](https://img.shields.io/static/v1?label=Kotlin&message=1.4.0&color=Orange&style=for-the-badge)
[![GitHub stars](https://img.shields.io/github/stars/DevSrSouza/Bukkript.svg?style=for-the-badge&color=orange&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADYklEQVR4XuWbvbPNQBiHn9uo6NFT0GEYHa0/QofOR2MojI8xxmh8VFwVf4RaxTB0KOhdPRUF8zPJmdy1J3l3N9ndxDb3zr0n2exzfu/zJjk5G5Qdh5vp35c6jI1SEzfzbgK/gXOljqMkgF3A1wbAXuBHCQglAehdf9wsWr8rDdlHSQCq+0MdBxzJvnqgFADJ752zYAHILsNSABT3Mw4A/S27DEsAaOW30wHwHcguwxIAuvJzyz67DEsA6MrPBaD/ZZVhbgA++bkQssowNwCf/FwAWWWYE8A6+bkAssowJ4A++RWTYU4AffIrJsNcACzyKyLDXAAs8isiwxwArPIrIsMcAELkl12GOQCEyC+7DAUgpj5LXLpPMeemAOwAXgLHp5ih4n2+Ak62JbCnuRmhn//D2ALUmre6DlAClAQlYsnjJ3ACeK1FuhI8CzxZ8uqbu06rG7C+LrBkKf5zpekDsFQp/pUeoBJYjXXnAUuT4kp6bnn3nQgtRYrbpBcCQK9dghR7b7RaToXnLMXB22sWAHOVold6oSXQvn5uUlwrvVgA2m4uUuyVXgqAuUgx6NMliwN8t6rcDzZrOXselF5qArR9rVI0SW8MANpHbVI0S28sADVJMUh6YwKoRYpB0hsbwEHgQ2ED6hg+xR5DTBfoznUDuB47+Ujb6Rhuxu4rFcBH4EDs5CNtp3dfKYgaKQBqiH+76OgySAFQQ/xbANFlkAKghvi3AKLLIBZATfFPKoNYADXFP6kMYgHUFP+kMogBUGP8o8sgBsBY8f8MXGqO/D6wP6qRb98ouBvEAEiNvx6DuwU8BH41x69L7AvANUBPlMSO4G4QCiAl/vpqzDPgKvBtzQp3A3eB0wmP8gedFIUCiI3/G+A88Nb41h4DHgFHja93r0/M1wahAELjr3f6CvC8+W5QyHp0bEqCEqFkWEdQGYQACIm/blI8AG4DqvmUISfIDXKE9dkFcxmEALDG/wVwEfiSsmrPtvsaqKcM+zV3gxAAQ/Fv25oATDkEYKhtmsvACqAv/r62NiUA7dvSNk1lYAXgi7+lrU0Noq9tmsrACsCNf2hbmxqEr22aysACoBv/lLY2NQRf2xwsAwsARUlnb2O1talBdNvmnaEbphYA94CnE7S1qUGobeozzMt9E/0BUX274HXoySkAAAAASUVORK5CYII=)](https://github.com/DevSrSouza/Bukkript/stargazers)
[![Github Issues](https://img.shields.io/github/issues-raw/DevSrSouza/Bukkript.svg?style=for-the-badge&color=orange&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGfklEQVR4Xu2bd6glNRSHv7Vjw46KDRULCqLYFVSwIHZFFCvYKzZU7A17r6CsiqjYG4oigqIidtQ/RCzYOzbsDZUPMst9900myczc3bfuHnj/vElyzvklOTntTmIGp0k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last commit](https://img.shields.io/github/last-commit/DevSrSouza/Bukkript/master.svg?style=for-the-badge&color=orange&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAABACAYAAABP97SyAAADZElEQVRoQ+2ZSciOURTHf1+ZZdoZMpdhIUOyJGTe2CpLyRhKYYGwQUghQ1nJ3sZQhpIQGbKhEMk8LMg8Rf/PfdT3ed/nTs/z9Xi7d/Uuzv+c8z//59577nmbaPDV1OD8SAT/d4WTgknBilcgfaIVF8iaXlLQWqKKGyQFKy6QNb2koLVEFTdICkYI1B2YA0wBxgKDgB7G3zvgIXATOAccB95HxKoLLUPBocA6YB7QxTHpT8BRYCvwwBHjZFYkwY7AZmAV0N4p+r9G34AdwCZAv6NXUQQHAseAMdEZ/XFwHZgLPIn1VwTBkWYf9Y5NphX+GTAZuBvjN5Zgf+AK0CcmiRysFJwAPA/1H0NQ++wSMD40uCPuMjAR+OFo38IshuAGcxiExPXF6FTWCeu9Qgn2A+4DnRwi6q47aPbpI2OvO1H34yJgtIOPj4Cun5cOtoUouBtYYQn2GVgOHM6xU4EXAvJnK9Z2YE1bENR99wLomRNM5GYAFxwTmgScspB8A/QFvjv6bDYL+URnm9YqL84Ci3K1sPpc91uSnw6c9iX4ywfgYKs9N87BrrWJii2sy550di+nRROUEjpUQtYSYF8IsB6mDILDgHuBSY4A7gRia8LKIKhDKLRRFvZLIuhRgTIUHB7RIKtxv+2Rv9W0DIKLgQPWyLUNlgF7ArFttgdvmRGF7+msYgs7qmiCvv5mAScsoJCrYimw1+J3GnDGJ+GQTkYnnd5nvXIC6SScCZx3TEYP25OAfNdbrwE1+aW3akpgl5m95OUvkiuBQznNhAqsy32nhZzibAPWOhbsr1mIggKr6dVzqbNDQO0rkdR4UKNCrSHAVPOScNlzei4J88ohXguTUIJyst5M0XxjhthLOSnovWIItgMumpmJd2APgGLoOfXTAxP9iWYOtOmvmk82JL4N89gUUO/PoBWjYBZQDbL2V9GTtadmbBjauDfnVwRB+RlgBr/6D6KIdc0MfkUyahVFUEl0ADYCq83vkMS+Apq9bPG97+oFK5JgFmOwGQ7NB7o6svwAHDEnZTZ5c4Tmm5VBMIvYDVBbl/19JuLZoOqtuRNvAGfNwEkkC19lEiw82RCHiWBI1aqESQpWSY2QXJKCIVWrEiYpWCU1QnJJCoZUrUqYpGCV1AjJJSkYUrUqYRpewd/nrH4569+7pgAAAABJRU5ErkJggg==)](https://github.com/DevSrSouza/Bukkript/commit)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?color=ORANGE&style=for-the-badge)](https://choosealicense.com/licenses/mit)
[![Build Status](https://img.shields.io/jenkins/build?jobUrl=http%3A%2F%2Fjenkins.devsrsouza.com.br%2Fjob%2FBukkript%2F&style=for-the-badge)](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)
}
```[![Preview](https://i.imgur.com/exlwVUs.gif)](https://github.com/DevSrSouza/KotlinBukkitAPI-Tooling)
## Hot recompilation
![Preview](https://i.imgur.com/VCu1uNI.gif)
## 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