Paste #38099: Untitled Paste

Date: 2016/12/02 21:59:28 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


noplotsmewehook: 
    type: command 
    name: domain 
    description: WorldEdit hook 
    usage: /setdomain 
    script: 
    - if <player.in_group[builder].world[global]> || <player.in_group[architect].world[global]> || <player.in_group[pro].world[global]> || <player.in_group[champion].world[global]> || <player.in_group[1htb38vn28v8vn10b8al].world[global]> || <player.in_group[4mv8b0vm18bv03m8vm10bjene8gi].world[global]> 
        { 
        - define selection <player.selected_region.list_partial_chunks> 
        - define selectionsize <player.selected_region.list_partial_chunks.list> 
        - define player <player.uuid> 
        - if <player.in_group[builder].world[global]> 
            { 
            - if <def[selectionsize]> >= 50 
                { 
                - foreach <def[selection]> 
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        { 
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world> 
                        - yaml create id:<def[chunkspot]> 
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid> 
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]> 
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain." 
                        }
                    }
                } 
            else 
                { 
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large." 
                } 
            } 
        - if <player.in_group[architect].world[global]> 
            { 
            - if <def[selectionsize]> >= 50 
                { 
                - foreach <def[selection]> 
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        { 
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world> 
                        - yaml create id:<def[chunkspot]> 
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid> 
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]> 
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain." 
                        }
                    } 
                } 
            else 
                { 
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large." 
                } 
            } 
        - if <player.in_group[pro].world[global]> 
            { 
            - if <def[selectionsize]> >= 50 
                { 
                - foreach <def[selection]> 
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        { 
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world> 
                        - yaml create id:<def[chunkspot]> 
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid> 
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]> 
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain." 
                        }
                    } 
            else 
                { 
                - narrate "<&5><&lt>NoPlotsMe<&gt>Your selection is too large." 
                } 
            } 
        - if <player.in_group[champion].world[global]> || <player.in_group[1htb38vn28v8vn10b8al].world[global]> || <player.in_group[4mv8b0vm18bv03m8vm10bjene8gi].world[global]> 
            { 
                - foreach <def[selection]> 
                    {
                    - if !<server.has_file[database/NPMchunks/<def[chunkspot]>.yml]>
                        { 
                        - define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world> 
                        - yaml create id:<def[chunkspot]> 
                        - yaml id:<def[chunkspot]> set uuid:<player.uuid> 
                        - yaml "savefile:database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]> 
                        - narrate "<&5><&lt>NoPlotsMe<&gt>This chunk is now in PUBLIC domain." 
                        }
                    } 
            } 
        }