-
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathLang.ts
More file actions
156 lines (128 loc) · 3.39 KB
/
Lang.ts
File metadata and controls
156 lines (128 loc) · 3.39 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
/**
* Represents language settings.
*/
export class Lang {
private readonly _title: string;
private readonly _langFile: string;
private readonly _contextMenu: ContextMenu;
private readonly _coords: Label;
private readonly _blockInfo: BlockInfo;
private readonly _layers: Label;
private readonly _link: Label;
private readonly _markers: Label;
private readonly _players: Label;
private readonly _worlds: Label;
constructor(title: string, langFile: string, contextMenu: ContextMenu, coords: Label, blockInfo: BlockInfo, layers: Label, link: Label, markers: Label, players: Label, worlds: Label) {
this._title = title;
this._langFile = langFile;
this._contextMenu = contextMenu;
this._coords = coords;
this._blockInfo = blockInfo;
this._layers = layers;
this._link = link;
this._markers = markers;
this._players = players;
this._worlds = worlds;
}
get title(): string {
return this._title;
}
get langFile(): string {
return this._langFile;
}
get contextMenu(): ContextMenu {
return this._contextMenu;
}
get coords(): Label {
return this._coords;
}
get blockInfo(): BlockInfo {
return this._blockInfo;
}
get layers(): Label {
return this._layers;
}
get link(): Label {
return this._link;
}
get markers(): Label {
return this._markers;
}
get players(): Label {
return this._players;
}
get worlds(): Label {
return this._worlds;
}
}
/**
* Represents a label and value.
*/
export class Label {
private readonly _label: string;
private readonly _value: string;
constructor(label: string, value: string) {
this._label = label;
this._value = value;
}
get label(): string {
return this._label;
}
get value(): string {
return this._value;
}
}
/**
* Represents 'unknown' values for BlockInfo.
*/
export class BlockInfoUnknown {
private readonly _block: string;
private readonly _biome: string;
constructor(block: string, biome: string) {
this._block = block;
this._biome = biome;
}
get block(): string {
return this._block;
}
get biome(): string {
return this._biome;
}
}
/**
* Represents a label and a value, with 'unknown' values.
*/
export class BlockInfo extends Label {
private readonly _unknown: BlockInfoUnknown;
constructor(label: string, value: string, unknown: BlockInfoUnknown) {
super(label, value);
this._unknown = unknown;
}
get unknown(): BlockInfoUnknown {
return this._unknown;
}
}
export class ContextMenu {
private readonly _label: string;
private readonly _copyCoords: string;
private readonly _copyLink: string;
private readonly _centerMap: string;
constructor(label: string, copyCoords: string, copyLink: string, centerMap: string) {
this._label = label;
this._copyCoords = copyCoords;
this._copyLink = copyLink;
this._centerMap = centerMap;
}
get label(): string {
return this._label;
}
get copyCoords(): string {
return this._copyCoords;
}
get copyLink(): string {
return this._copyLink;
}
get centerMap(): string {
return this._centerMap;
}
}