Date: 2015/10/21 23:12:45 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
########################
#
# Commands to set and go to a spawn point
#
# LAST:
# Carisus (2015/10/21) - Initial creation of script
#
# TODO: Make a better description
# Add multiple/named spawns
#
# Permissions added: (currently escaped)
# yeticraft.cmd.setspawn
# yeticraft.cmd.spawn
#
########################
setting_spawn:
Type: command
debug: true
name: SetSpawn
description: <&9>Sets the world Spawn Point to the location you are at
usage: /setspawn <<>world<>>
# permission: yeticraft.cmd.setspawn
script:
- if <context.server> {
- narrate "<&c> WHAO<&co> <&e>You must be a player in-game to run this command"
- queue clear
}
# - if <player.has_permission[yeticraft.cmd.setspawn].not> {
# - narrate "<&c>You do not have permission to set the world spawn"
# - queue clear
# }
- define here l@<player.location.block.x.add[.5]>,<player.location.block.y.add[.5]>,<player.location.block.z.add[.5]>,<player.location.pitch>,<player.location.yaw>,<player.world>
- define world <context.args.get[1]||null>
- if <def[world]> == null {
- define world <player.world>
}
- if <def[world]> == <server.list_worlds> {
- narrate "<&c>Could not find <&6>%world%<&c>, are you sure it loaded?"
- queue clear
}
- flag server %world%_spawnpoint:%here%
- narrate "<&6>Spawn Point set"
going_to_spawn:
type: command
debug: true
name: Spawn
usage: /spawn
description: Send you to the worlds Spawn Point
# permission: yeticraft.cmd.spawn
script:
- if <context.server> {
- narrate "<&c> WHAO<&co> <&e>You must be a player in-game to run this command"
- queue clear
}
# - if <player.has_permission[yeticraft.cmd.spawn].not> {
# - narrate "<&c>You do not have permission to teleport to this worlds SpawnPoint"
# - queue clear
# }
- define world <player.world>
- if <server.has_flag[<def[world]>_spawnpoint].not> {
- narrate "<&6>Spawn Point for %world% has not been set"
- queue clear
}
# - teleport <player> <%world%.spawn_location>
- teleport <player> <server.flag[<def[world]>_spawnpoint]>