Class SlotMatchers
- java.lang.Object
-
- org.spongepowered.api.item.inventory.slot.SlotMatchers
-
public final class SlotMatchers extends java.lang.Object
A collection ofKeyValueMatcher
s that can be used to query forSlot
s.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyValueMatcher<java.lang.Integer>
index(int index)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against slot indexes.static KeyValueMatcher<java.lang.Integer>
index(int index, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against slot indexes.static KeyValueMatcher<Vector2i>
position(int x, int y)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against a slot position.static KeyValueMatcher<Vector2i>
position(int x, int y, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against a slot position.static KeyValueMatcher<Vector2i>
position(Vector2i pos)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against a slot position.static KeyValueMatcher<Vector2i>
position(Vector2i pos, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against a slot position.
-
-
-
Method Detail
-
index
public static KeyValueMatcher<java.lang.Integer> index(int index)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against slot indexes.- Parameters:
index
- The slot index- Returns:
- The property query
-
index
public static KeyValueMatcher<java.lang.Integer> index(int index, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against slot indexes.- Parameters:
index
- The slot index valueoperator
- The operator- Returns:
- The property query
-
position
public static KeyValueMatcher<Vector2i> position(Vector2i pos)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against a slot position.- Parameters:
pos
- The slot position- Returns:
- The property query
-
position
public static KeyValueMatcher<Vector2i> position(int x, int y)
Creates aKeyValueMatcher
with the default operatorKeyValueMatcher.Operator.EQUAL
to match against a slot position.- Parameters:
x
- The x coordinatey
- The y coordinate- Returns:
- The property query
-
position
public static KeyValueMatcher<Vector2i> position(Vector2i pos, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against a slot position.- Parameters:
pos
- The slot positionoperator
- The operator- Returns:
- The property query
-
position
public static KeyValueMatcher<Vector2i> position(int x, int y, KeyValueMatcher.Operator operator)
Creates aKeyValueMatcher
to match against a slot position.- Parameters:
x
- The x coordinatey
- The y coordinateoperator
- The operator- Returns:
- The property query
-
-