Paste #49635: Untitled Paste

Date: 2018/09/07 16:38:28 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20


###The Script below handles the basic functions of the PlayerData script###
playerdata:
  type: world
  events:
    on player logs in:
    - if <server.has_file[/PlayerData/<player.uuid>.yml]> {
      - yaml "load:/PlayerData/<player.uuid>.yml" id:<player.uuid>
      } else {
      - yaml create id:<player.uuid>
      }
    on player quits:
    - yaml "savefile:/PlayerData/<player.uuid>.yml" id:<player.uuid>
    - yaml unload id:<player.uuid>
    on shutdown:
    - foreach <server.list_online_players>:
    - yaml "savefile:/PlayerData/<player.uuid>.yml" id:<player.uuid>
    on system time minutely:
    - foreach <server.list_online_players>:
    - yaml "savefile:/PlayerData/<player.uuid>.yml" id:<player.uuid>
 ###Action Listeners###