xpdrops: fix recoloring xpdrops with hide skill icons on
The widget child array is filled with nulls to hide the sprites. It is also valid for the child array to have null entries in it in general, but that does not happen otherwise.
This commit is contained in:
@@ -28,6 +28,7 @@ import com.google.inject.Provides;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.IntStream;
|
||||
import javax.inject.Inject;
|
||||
import net.runelite.api.Client;
|
||||
@@ -112,6 +113,7 @@ public class XpDropPlugin extends Plugin
|
||||
final IntStream spriteIDs =
|
||||
Arrays.stream(children)
|
||||
.skip(1) // skip text
|
||||
.filter(Objects::nonNull)
|
||||
.mapToInt(Widget::getSpriteId);
|
||||
|
||||
int color = 0;
|
||||
|
||||
Reference in New Issue
Block a user