Date: 2020/10/13 20:46:25 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
admin_quick_teleports:
type: command
name: quick_teleports
usage: /quick_teleports
description: teleports you across the maps
tab complete:
- define args <list[add|remove|teleport]>
- determine <[args]>
script:
- if <context.args.is_empty>:
- give <player> written_book
- stop
- if <context.args.size> != 2:
- inject command_syntax
- define arg2 <context.args.get[2]>
- if <server.has_flag[behr.essentials.teleport.locations]>:
- define locations <server.flag[behr.essentials.teleport.locations].as_map>
- else:
- define locations <list>
- choose <context.args.first>:
- case add:
- if <[locations].contains[<[arg2]>]>:
- define reason "Nothing interesting happens."
- inject command_error
- flag server behr.essentials.teleport.locations:<[locations].with[<[arg2].as[<player.location>]>]>
- narrate "Added <[arg2].to_titlecase>"
- case remove:
- if !<[locations].contains[<[arg2]>]>:
- define reason "Nothing interesting happens."
- inject command_error
- flag server behr.essentials.teleport.locations:<[locations].exclude[<[arg2]>]>
- narrate "Removed <[arg2].to_titlecase>"
- case teleport:
- if !<[locations].contains[<[arg2]>]>:
- define reason "Nothing interesting happens."
- inject command_error
- teleport <[locations].get[<[arg2]>]>
- narrate "teleported to <[arg2].to_titlecase>"
- default:
- inject command_syntax