Date: 2015/08/02 22:04:35 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
Load Player Cards:
type: world
events:
on player joins:
- run "s@Load_YAML" "def:/saves/cards/|<player.uuid>cards"
on player quit:
- run "s@Unload_YAML" "def:/saves/cards/|<player.uuid>cards"
Cards Command:
type: command
name: card
aliases:
- cards
- char
- chars
- charcard
- charcards
- cc
- ccs
usage: /card
description: Manage your character cards
permission: command.charactercard
permission message: "<&c>Upgrade to <&a>Premium <&c>for this feature!"
script:
- if <context.server> {
- narrate "<&c>This is a player only command!"
- queue clear
}
- define Cmd <context.args.get[1]||list>
- if <el@list.starts_with[<def[Cmd]>]> {
- define Cards <yaml[<player.uuid>cards].list_keys[]>
- if <def[Cards].is_empty> {
- narrate "<&c>You have no character cards!"
- queue clear
}
- narrate "<&2>Your character cards are: <&b><def[Cards].separated_by[<&f>, <&b>]><&2>."
}