10
10
import net .md_5 .bungee .api .chat .TextComponent ;
11
11
import net .minecraft .advancements .AdvancementFrameType ;
12
12
13
+ /**
14
+ * Represents the Display Information of an Advancement
15
+ *
16
+ * @author Axel
17
+ *
18
+ */
13
19
public class AdvancementDisplay {
14
20
15
21
private ItemStack icon ;
@@ -28,8 +34,6 @@ public class AdvancementDisplay {
28
34
* @param title Title {@link JSONMessage}
29
35
* @param description Description {@link JSONMessage}
30
36
* @param frame {@link AdvancementFrame}
31
- * @param showToast Should toast messages be shown
32
- * @param announceChat Should advancements be announced in chat
33
37
* @param visibility When an advancement is visible
34
38
*/
35
39
public AdvancementDisplay (Material icon , JSONMessage title , JSONMessage description , AdvancementFrame frame , AdvancementVisibility visibility ) {
@@ -46,8 +50,6 @@ public AdvancementDisplay(Material icon, JSONMessage title, JSONMessage descript
46
50
* @param title Title {@link String}
47
51
* @param description Description {@link String}
48
52
* @param frame {@link AdvancementFrame}
49
- * @param showToast Should toast messages be shown
50
- * @param announceChat Should advancements be announced in chat
51
53
* @param visibility When an advancement is visible
52
54
*/
53
55
public AdvancementDisplay (Material icon , String title , String description , AdvancementFrame frame , AdvancementVisibility visibility ) {
@@ -66,8 +68,6 @@ public AdvancementDisplay(Material icon, String title, String description, Advan
66
68
* @param description Description {@link JSONMessage}
67
69
* @param frame {@link AdvancementFrame}
68
70
* @param backgroundTexture Background texture path
69
- * @param showToast Should toast messages be shown
70
- * @param announceChat Should advancements be announced in chat
71
71
* @param visibility When an advancement is visible
72
72
*/
73
73
public AdvancementDisplay (Material icon , JSONMessage title , JSONMessage description , AdvancementFrame frame , String backgroundTexture , AdvancementVisibility visibility ) {
@@ -86,8 +86,6 @@ public AdvancementDisplay(Material icon, JSONMessage title, JSONMessage descript
86
86
* @param description Description {@link String}
87
87
* @param frame {@link AdvancementFrame}
88
88
* @param backgroundTexture Background texture path
89
- * @param showToast Should toast messages be shown
90
- * @param announceChat Should advancements be announced in chat
91
89
* @param visibility When an advancement is visible
92
90
*/
93
91
public AdvancementDisplay (Material icon , String title , String description , AdvancementFrame frame , String backgroundTexture , AdvancementVisibility visibility ) {
@@ -108,8 +106,6 @@ public AdvancementDisplay(Material icon, String title, String description, Advan
108
106
* @param title Title {@link JSONMessage}
109
107
* @param description Description {@link JSONMessage}
110
108
* @param frame {@link AdvancementFrame}
111
- * @param showToast Should toast messages be shown
112
- * @param announceChat Should advancements be announced in chat
113
109
* @param visibility When an advancement is visible
114
110
*/
115
111
public AdvancementDisplay (ItemStack icon , JSONMessage title , JSONMessage description , AdvancementFrame frame , AdvancementVisibility visibility ) {
@@ -126,8 +122,6 @@ public AdvancementDisplay(ItemStack icon, JSONMessage title, JSONMessage descrip
126
122
* @param title Title {@link String}
127
123
* @param description Description {@link String}
128
124
* @param frame {@link AdvancementFrame}
129
- * @param showToast Should toast messages be shown
130
- * @param announceChat Should advancements be announced in chat
131
125
* @param visibility When an advancement is visible
132
126
*/
133
127
public AdvancementDisplay (ItemStack icon , String title , String description , AdvancementFrame frame , AdvancementVisibility visibility ) {
@@ -146,8 +140,6 @@ public AdvancementDisplay(ItemStack icon, String title, String description, Adva
146
140
* @param description Description {@link JSONMessage}
147
141
* @param frame {@link AdvancementFrame}
148
142
* @param backgroundTexture Background texture path
149
- * @param showToast Should toast messages be shown
150
- * @param announceChat Should advancements be announced in chat
151
143
* @param visibility When an advancement is visible
152
144
*/
153
145
public AdvancementDisplay (ItemStack icon , JSONMessage title , JSONMessage description , AdvancementFrame frame , String backgroundTexture , AdvancementVisibility visibility ) {
@@ -166,8 +158,6 @@ public AdvancementDisplay(ItemStack icon, JSONMessage title, JSONMessage descrip
166
158
* @param description Description {@link String}
167
159
* @param frame {@link AdvancementFrame}
168
160
* @param backgroundTexture Background texture path
169
- * @param showToast Should toast messages be shown
170
- * @param announceChat Should advancements be announced in chat
171
161
* @param visibility When an advancement is visible
172
162
*/
173
163
public AdvancementDisplay (ItemStack icon , String title , String description , AdvancementFrame frame , String backgroundTexture , AdvancementVisibility visibility ) {
@@ -180,10 +170,25 @@ public AdvancementDisplay(ItemStack icon, String title, String description, Adva
180
170
setVisibility (visibility );
181
171
}
182
172
173
+ /**
174
+ * Represents the Frame of an Advancement
175
+ *
176
+ * @author Axel
177
+ *
178
+ */
183
179
public static enum AdvancementFrame {
184
180
181
+ /**
182
+ * A Task has the default Frame and defaults to a green Color in Completion Messages
183
+ */
185
184
TASK (AdvancementFrameType .a ),
185
+ /**
186
+ * A Goal has a rounded off Frame and defaults to a green Color in Completion Messages
187
+ */
186
188
GOAL (AdvancementFrameType .b ),
189
+ /**
190
+ * A Challenge has a differently shaped Frame and defaults to a purple Color in Completion Messages and it's Toast plays a Sound when displayed
191
+ */
187
192
CHALLENGE (AdvancementFrameType .c )
188
193
;
189
194
@@ -193,6 +198,11 @@ private AdvancementFrame(AdvancementFrameType nms) {
193
198
this .nms = nms ;
194
199
}
195
200
201
+ /**
202
+ * Get the NMS Representation of this AdvancementFrame
203
+ *
204
+ * @return THE NMS Representation
205
+ */
196
206
public AdvancementFrameType getNMS () {
197
207
return nms ;
198
208
}
@@ -365,7 +375,7 @@ public void setTitle(String title) {
365
375
/**
366
376
* Changes the Description
367
377
*
368
- * @param title New title {@link JSONMessage}
378
+ * @param description New description {@link JSONMessage}
369
379
*/
370
380
public void setDescription (JSONMessage description ) {
371
381
this .description = description ;
@@ -374,7 +384,7 @@ public void setDescription(JSONMessage description) {
374
384
/**
375
385
* Changes the Description
376
386
*
377
- * @param title New Title {@link String}
387
+ * @param description New Description {@link String}
378
388
*/
379
389
public void setDescription (String description ) {
380
390
this .description = new JSONMessage (new TextComponent (description ));
0 commit comments