Add base for Kotlin commands

This commit is contained in:
Cube
2017-06-03 02:22:37 +03:00
parent ce3150082d
commit 30fc810d61
5 changed files with 49 additions and 4 deletions
+7
View File
@@ -0,0 +1,7 @@
name = "Chat commands"
package = "org.apollo.game.plugin.cmd"
authors = [ "Graham", "cubeee" ]
[config]
srcDir = "src/"
testDir = "test/"
@@ -0,0 +1,5 @@
import org.apollo.game.model.entity.setting.PrivilegeLevel
// Opens the player's bank if they are an administrator.
on_command("bank", PrivilegeLevel.ADMINISTRATOR)
.then { player, _ -> player.openBank() }
+4
View File
@@ -16,6 +16,10 @@ fun <T : Message> on(type: () -> KClass<T>): KotlinMessageHandler<T> {
null!!
}
fun on_command(command: String, privileges: PrivilegeLevel): KotlinCommandHandler {
null!!
}
fun start(callback: (World) -> Unit) {
}