Date: 2016/10/06 22:43:34 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
noplotsme:
type: world
events:
on player breaks block:
- define chunkspot <context.location.chunk.x>,<context.location.chunk.z>,<context.location.world>
#Names the chunk location for reference later ^
- if <server.has_file[/database/NPMchunks/<def[chunkspot]>.yml]>
{
- yaml "load:/database/NPMchunks/<def[chunkspot]>.yml" id:<def[chunkspot]>
- define uuid <yaml[<def[chunkspot]>].read[uuid]>
}
#Loads the chunk data if it exists ^
#vaporwave v if the chunk is already defined v
- if <player.has_permission[NPM.vaporwave]>
{
- if <yaml.list.contains[<def[chunkspot]>]>
{
- if !<def[uuid]> == <player.uuid>
{
- determine passively cancelled
- if <server.has_file[/database/NPMbasics/<player.uuid>]>
{
- narrate "<&5><<>NoPlotsMe<>>You cannot build here, please use your own chunk."
}
else
{
- narrate "<&5><<>NoPlotsMe<>>You cannot build here, find some free land."
}
}
}
#if the chunk isn't defined v
else
{
- if <server.has_file[/database/NPMbasics/<player.uuid>]>
{
- determine passively cancelled
}
else
{
- yaml create id:<def[chunkspot]>
- yaml id:<def[chunkspot]> set uuid:<player.uuid>
- yaml "savefile:/database/NPMchunks/<def[chunkspot]>" id:<def[chunkspot]>
- yaml create id:<player.uuid>
- yaml id:<player.uuid> set chunkspot:<def[chunkspot]>
- yaml "savefile:/database/NPMbasics/<player.uuid>" id:<player.uuid>
- narrate "<&5><&l><<>NoPlotsMe<>>This chunk is now yours, /NPM help for help."
- flag player chunkreset duration:1w
}
}
}
#midwave v if the chunk is already defined v
- if <player.has_permission[NPM.midwave]>
{
- if <yaml.list.contains[<def[chunkspot]>]>
{
- if <<def[uuid]>.has_permission[NPM.vaporwave].global>
{
- determine passively cancelled
- narrate "<&5><<>NoPlotsMe<>>You cannot build here,this is a PLAYER chunk."
}
}
#If the chunk isn't defined v
else
{
- yaml create id:<def[chunkspot]>
- yaml id:<def[chunkspot]> set uuid:<player.uuid>
- yaml "savefile:/database/NPMchunks/<def[chunkspot]>" id:<def[chunkspot]>
- narrate "<&5><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}
#highwave v if the chunk is defined v
- if <player.has_permission[NPM.highwave]>
{
- if <yaml.list.contains[<def[chunkspot]>]>
{
- if <<def[uuid]>.has_permission[NPM.vaporwave].global>
{
- if !<player.has_flag[highvaportimer]>
{
- narrate "<&5><<>NoPlotsMe<>>You are building in a PLAYER chunk."
- flag <player> highvaportimer duration:10m
}
}
}
else
{
- yaml create id:<def[chunkspot]>
- yaml id:<def[chunkspot]> set uuid:<player.uuid>
- yaml "savefile:/database/NPMchunks/<def[chunkspot]>" id:<def[chunkspot]>
- narrate "<&5><<>NoPlotsMe<>>This chunk is now in PUBLIC domain."
}
}