Skip to content

Commit

Permalink
more asserts for new ObjectCondition ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Nov 16, 2024
1 parent 58d8c96 commit ecf59f5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import net.runelite.api.Tile;
import net.runelite.api.TileObject;
import net.runelite.api.coords.WorldPoint;
import java.util.List;
import java.util.Objects;
import java.util.Set;

public class ObjectCondition extends ConditionForStep
Expand Down Expand Up @@ -71,6 +71,8 @@ public ObjectCondition(int objectID, Zone zone)
public ObjectCondition(Set<Integer> objectIDs, WorldPoint worldPoint)
{
assert(worldPoint != null);
assert(objectIDs != null);
assert(objectIDs.stream().noneMatch(Objects::isNull));

this.objectIDs = objectIDs;
this.zone = new Zone(worldPoint);
Expand Down

0 comments on commit ecf59f5

Please sign in to comment.