Skip to content

Commit d861208

Browse files
Add null check to client config access in ListIota.display() (#925)
2 parents e52312d + 287d5df commit d861208

File tree

1 file changed

+1
-1
lines changed
  • Common/src/main/java/at/petrak/hexcasting/api/casting/iota

1 file changed

+1
-1
lines changed

Common/src/main/java/at/petrak/hexcasting/api/casting/iota/ListIota.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Component display(Tag tag) {
136136
if (i < list.size() - 1) {
137137
var thisIotaNeedsComma = IotaType.getTypeFromTag(csub) != PatternIota.TYPE;
138138
var nextIotaNeedsComma = IotaType.getTypeFromTag(HexUtils.downcast(list.get(i+1), CompoundTag.TYPE)) != PatternIota.TYPE;
139-
var alwaysShowCommas = HexConfig.client().alwaysShowListCommas();
139+
var alwaysShowCommas = HexConfig.client() != null && HexConfig.client().alwaysShowListCommas();
140140
if (thisIotaNeedsComma || nextIotaNeedsComma || alwaysShowCommas)
141141
out.append(", ");
142142
}

0 commit comments

Comments
 (0)