1.0.0.3 - new modules
Added utility, menu, thirdparty and exposed modules A few little fixes
This commit is contained in:
1 parent
e5a7e08e56
commit
9655d10025
63 files changed
+5334
-12
No files matched your search
@@ -1,15 +1,97 @@
|
||||
# KotlinBukkitKit
|
||||
KotlinBukkitKit is an API for Bukkit/SpigotAPI using features Kotlin. DevSrSouza / KotlinBukkitAPI.
|
||||
KotlinBukkitKit is an API for Bukkit/SpigotAPI using features Kotlin.
|
||||
Thanks for DevSrSouza / KotlinBukkitAPI.
|
||||
|
||||
|
||||
```kotlin
|
||||
implementation("tech.carcadex:kotlinbukkitkit-architecture:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-extensions:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-serialization:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-genref:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-messages:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-commands:1.0.0.2")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-architecture:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-extensions:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-serialization:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-messages:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-commands:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-utility:1.0.0.3")
|
||||
implementation("tech.carcadex:kotlinbukkitkit-exposed:1.0.0.3")
|
||||
|
||||
compileOnly("tech.carcadex:kotlinbukkitkit-genref:1.0.0.3")
|
||||
ksp("tech.carcadex:kotlinbukkitkit-genref:1.0.0.3")
|
||||
```
|
||||
|
||||
|
||||
Documentation will be there: https://red-tea.gitbook.io/kotlinbukkitkit/
|
||||
|
||||
|
||||
<img src="https://github.com/DevSrSouza/KotlinBukkitAPI/raw/master/icon.png?size=96" alt="KotlinBukkitAPI" title="KotlinBukkitAPI" align="right"/>
|
||||
|
||||
## KotlinBukkitKit
|
||||
|
||||

|
||||
[](https://github.com/DevSrSouza/KotlinBukkitAPI/stargazers)
|
||||
[](https://github.com/DevSrSouza/KotlinBukkitAPI/issues)
|
||||
[](https://github.com/DevSrSouza/KotlinBukkitAPI/commit)
|
||||
[](https://discord.gg/pyrh4dUPZD)
|
||||
[](https://choosealicense.com/licenses/mit)
|
||||
|
||||
KotlinBukkitKit is an API for Bukkit/SpigotAPI using the cool and nifty features Kotlin has to make your life more easier.
|
||||
|
||||
### Contents:
|
||||
|
||||
* [Documentation](https://red-tea.gitbook.io/kotlinbukkitkit)
|
||||
* [IDEA Plugin](https://github.com/CarcadeX/KotlinBukkitKit-Tooling)
|
||||
|
||||
|
||||
# Samples
|
||||
|
||||
## [We have more Samples in the Documentation](https://red-tea.gitbook.io/kotlinbukkitkit)
|
||||
|
||||
KotlinBukkitAPI goes beyond this samples, and you can find all of it in the [wiki/documentation](https://red-tea.gitbook.io/kotlinbukkitkit).
|
||||
|
||||
Event DSL sample
|
||||
```kotlin
|
||||
plugin.events {
|
||||
event<PlayerJoinEvent> {
|
||||
player.msg("&3Welcome ${player.name}".translateColor())
|
||||
}
|
||||
|
||||
event<PlayerQuitEvent> {
|
||||
broadcast("&eThe player &c${player.name} &eleft :(".translateColor())
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Simple Command DSL example
|
||||
```kotlin
|
||||
plugin.simpleCommand("hi") {
|
||||
sender.msg("&eHallo".translateColor())
|
||||
}
|
||||
```
|
||||
|
||||
Item meta DSL and other stuff
|
||||
```kotlin
|
||||
val gem = item(Material.DIAMOND).apply {
|
||||
amount = 5
|
||||
meta<ItemMeta> {
|
||||
displayName = "&bGem".translateColor()
|
||||
}
|
||||
}
|
||||
val encbook = item(Material.ENCHANTED_BOOK).meta<EnchantmentStorageMeta> {
|
||||
displayName = "&4&lThe powerful BOOK".translateColor()
|
||||
addStoredEnchant(Enchantment.DAMAGE_ALL, 10, true) // putting sharpness 10 to the book
|
||||
}
|
||||
```
|
||||
|
||||
Another approach:
|
||||
```kotlin
|
||||
val gem = item(Material.DIAMOND, amount = 5).displayName("&bGem".translateColor())
|
||||
|
||||
val encbook = metadataItem<EnchantmentStorageMeta>(Material.ENCHANTED_BOOK) {
|
||||
displayName = "&4&lThe powerful BOOK".translateColor()
|
||||
addStoredEnchant(Enchantment.DAMAGE_ALL, 10, true) // putting sharpness 10 to the book
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## IDEA Plugin - project wizard
|
||||
|
||||
You can find it on a <a href="https://plugins.jetbrains.com/plugin/24043-kotlinbukkitkit-tooling">official plugin page</a>
|
||||

|
||||
Reference in new issue
Block a user