Improve ::position command message

This commit is contained in:
Major
2018-03-28 17:48:07 +01:00
parent 4b68b8e47e
commit 0316753f46
2 changed files with 13 additions and 6 deletions
+6 -5
View File
@@ -1,12 +1,13 @@
plugin {
name = "chat_commands"
authors = [
"Graham",
"Major",
"lare96",
"cubeee",
"Graham",
"Major",
"lare96",
"cubeee",
]
dependencies = [
"util:command",
"api",
"util:command",
]
}
+7 -1
View File
@@ -2,13 +2,19 @@ import com.google.common.primitives.Ints
import org.apollo.game.model.Position
import org.apollo.game.model.entity.setting.PrivilegeLevel
import org.apollo.game.plugin.util.command.valid_arg_length
import org.apollo.game.plugins.api.component1
import org.apollo.game.plugins.api.component2
import org.apollo.game.plugins.api.component3
/**
* Sends the player's position.
*/
on_command("pos", PrivilegeLevel.MODERATOR)
.then { player ->
player.sendMessage("You are at: ${player.position}.")
val (x, y, z) = player.position
val region = player.position.regionCoordinates
player.sendMessage("You are at: ($x, $y, $z) in region (${region.x}, ${region.y}).")
}
/**