Paste #44180: Untitled Paste

Date: 2017/09/06 03:23:40 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


- case "core":
            - if <player.flag[rank]> == leader {
                - if <context.args.size> == 2 {
                    - if <yaml[<player.flag[nation]>.read[cores]||null> == null {
                        - narrate "<&a>Setting nation core as '<context.args.get[2]>'" 
                        - yaml id:<player.flag[nation]> set cores:!
                        - yaml id:<player.flag[nation]> set cores.<player.location.chunk>:<context.args.get[2]>
                        - yaml "savefile:dNations/<player.flag[nation]>.yml" id:<player.flag[nation]>
                    }
                }
                else {
                    - narrate "<&c>You must specify an ID!"
                }
            }
            else {
                - narrate "<&c>You must be a nation leader to set a core chunk!"
            }