File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
plugin/src/main/java/com/denizenscript/denizen/nms/util/jnbt Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,10 @@ public ListTagBuilder(Class<? extends Tag> type) {
5151 */
5252 public ListTagBuilder add (Tag value ) {
5353 checkNotNull (value );
54- if (!type .isInstance (value )) {
54+ // Denizen - list tags are no longer necessarily single-typed. This API is old enough to probably need replacement.
55+ /*if (!type.isInstance(value)) {
5556 throw new IllegalArgumentException(value.getClass().getCanonicalName() + " is not of expected type " + type.getCanonicalName());
56- }
57+ }*/
5758 entries .add (value );
5859 return this ;
5960 }
@@ -103,11 +104,11 @@ public static <T extends Tag> ListTagBuilder createWith(T... entries) {
103104 }
104105
105106 Class <? extends Tag > type = entries [0 ].getClass ();
106- for (int i = 1 ; i < entries .length ; i ++) {
107+ /* for (int i = 1; i < entries.length; i++) { // Denizen - disable check
107108 if (!type.isInstance(entries[i])) {
108109 throw new IllegalArgumentException("An array of different tag types was provided");
109110 }
110- }
111+ }*/
111112
112113 ListTagBuilder builder = new ListTagBuilder (type );
113114 builder .addAll (Arrays .asList (entries ));
You can’t perform that action at this time.
0 commit comments