Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions example-scripts/simple/tpalea.ktskript
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
registerCommand("tpalea")
{
permission("tpalea.perm")
action(onlyPlayers = true)
{
val command = "execute @a[name=${player.name}] ~ ~ ~ /spreadplayers ~ ~ 2000 5000 false @s"
Server.console.executeCommand(command)
}
}
registerCommand("tpaleap")
{
permission("tpaleap.perm")
arguments(player("player"))
action(onlyPlayers = true)
{
val p = argument<Player>("player")
val command = "execute @a[name=${p.name}] ~ ~ ~ /spreadplayers ~ ~ 2000 5000 false @p[name=${p.name}]"
Server.console.executeCommand(command)
}
}