diff --git a/example-scripts/admpw.ktscript b/example-scripts/admpw.ktscript new file mode 100644 index 0000000..25413c1 --- /dev/null +++ b/example-scripts/admpw.ktscript @@ -0,0 +1,22 @@ +registerCommand("admpw") +{ + permission("admpw.perm") + arguments(player("player"),string("cmd"),integer("nbtimes")) + action(onlyPlayers = false) + { + val p = argument("player") + val cmd = argument("cmd") + val nbtimes = argument("nbtimes") + if(cmd.equals("fall")) + { + val command = "execute @a[name=${p.name}] ~ ~ ~ setblock ~ ~-1 ~ air" + for (x in 0..nbtimes) + { + delayTicks(1+(x*3)) + { + Server.console.executeCommand(command); + } + } + } + } +}