Date: 2015/01/07 20:13:15 UTC-08:00
Type: Denizen Script
warp:
type: command
name: warp
description: Warp to a set waypoint, see /warps to list the options.
usage: /warp warpname
script:
#Add the permission denizen.warp to your permissions file if you want them to be able to use /warp
- if !<player.has_permission[denizen.warp]> {
- narrate "Sorry you don't have the Denizen command permission."
- queue clear
} else {
- if <context.args.size> = 0 || <context.args.size> > 1 {
- narrate "The warp name needs to be a single word!"
- queue clear
} else {
- if !<server.has_flag[warps.<context.args.get[1]>]> {
narrate "Sorry that warp doesn't exist!"
- queue clear
} else {
#Add the permission denizen.warp.admin to your permissions file if you want them to be able to warp to your admin lounge
- if <context.args.get[1]> matches admin && <player.has_permission[denizen.warp.admin]> {
- narrate "sorry you can't warp to the Admin Lounge."
- queue clear
} else {
- teleport <player> <server.flag[warps.admin]>
} else {
- teleport <player> <server.flag[warps.<context.args.get[1]>]>
- wait 10t
- narrate "Warp successful!"
}
}