1.0.0.2
Command fixes, new extensions
This commit is contained in:
1 parent
050b1a5344
commit
b160b05d82
5 files changed
+16
-33
No files matched your search
+1
-1
@@ -6,7 +6,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "tech.carcadex"
|
||||
version = "1.0.0.1"
|
||||
version = "1.0.0.2"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package tech.carcadex.kotlinbukkitkit.commands
|
||||
|
||||
import tech.carcadex.kotlinbukkitkit.architecture.KotlinPlugin
|
||||
import tech.carcadex.kotlinbukkitkit.commands.dsl.builder.simpleCommand
|
||||
|
||||
fun KotlinPlugin.onEnable() {
|
||||
simpleCommand(
|
||||
name = "test",
|
||||
permission = "test.use",
|
||||
tabComplete = listOf("subcmd1", "subcmd2")
|
||||
) {
|
||||
sender.sendMessage("test")
|
||||
val arg1 = argument(0) //getting 1 argument of command as nullable string
|
||||
//also you can use stringOrNull
|
||||
val arg2 = string(1) //getting 1 argument of command as string
|
||||
val arg3 = integer(2) //getting 2 argument of command as integer
|
||||
//also you can use integerOrNull
|
||||
val arg4 = double(3) //getting 3 argument of command as integer
|
||||
//also you can use doubleOrNull
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package tech.carcadex.kotlinbukkitkit.commands.extensions
|
||||
|
||||
import org.bukkit.command.CommandSender
|
||||
|
||||
typealias Sender = CommandSender;
|
||||
-1
@@ -11,7 +11,6 @@ object MessagesService {
|
||||
messages["#no-such-player"] = { it.sendMessage("${ChatColor.RED}No such player was found") }
|
||||
messages["#no-such-world"] = { it.sendMessage("${ChatColor.RED}No such world was found") }
|
||||
messages["#no-such-material"] = { it.sendMessage("${ChatColor.RED}No such material was found") }
|
||||
messages["#no-such-world"] = { it.sendMessage("${ChatColor.RED}No such world was found") }
|
||||
messages["#no-such-enum"] = { it.sendMessage("${ChatColor.RED}No such value for this enum was found") }
|
||||
messages["#not-a-number"] = { it.sendMessage("${ChatColor.RED}It is not a number") }
|
||||
messages["#wrong-usage"] = { it.sendMessage("${ChatColor.RED}Wrong usage of command") }
|
||||
|
||||
+10
-10
@@ -1,18 +1,18 @@
|
||||
version=lastest
|
||||
version=1.0.0.2
|
||||
|
||||
signing.gnupg.executable=gpg.exe
|
||||
signing.gnupg.executable=C:/Program Files (x86)/GnuPG/bin/gpg.exe
|
||||
signing.gnupg.useLegacyGpg=false
|
||||
signing.gnupg.keyName=secret
|
||||
signing.gnupg.passphrase=secret
|
||||
signing.gnupg.keyName=0D0AC475D4E1770131FF571149B3C697DD0584C4
|
||||
signing.gnupg.passphrase=ere112
|
||||
|
||||
|
||||
ossrhUsername=secret
|
||||
ossrhPassword=secret
|
||||
ossrhUsername=itzRedTea
|
||||
ossrhPassword=Au~Ra~258+++
|
||||
|
||||
nexusUsername=secret
|
||||
nexusPassword=secret
|
||||
sonatype.stagingProfileId=secret
|
||||
nexusUsername=itzRedTea
|
||||
nexusPassword=Au~Ra~258+++
|
||||
sonatype.stagingProfileId=iRedTea
|
||||
|
||||
password=secret
|
||||
password=Au~Ra~258+++
|
||||
|
||||
kotlin.code.style=official
|
||||
Reference in new issue
Block a user