Package dev.jorel.commandapi.arguments
Record Class EntitySelector
java.lang.Object
java.lang.Record
dev.jorel.commandapi.arguments.EntitySelector
public record EntitySelector(int maxResults, boolean includesEntities, EntitySelector.Order order, boolean selfSelector, String playerName, Predicate<org.bukkit.entity.Entity> entityCheck, UUID entityUUID, org.bukkit.entity.EntityType type)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EntitySelector.Orderstatic final EntitySelector.Orderstatic final EntitySelector.Orderstatic final EntitySelector.Order -
Constructor Summary
ConstructorsConstructorDescriptionEntitySelector(int maxResults, boolean includesEntities, EntitySelector.Order order, boolean selfSelector, String playerName, Predicate<org.bukkit.entity.Entity> entityCheck, UUID entityUUID, org.bukkit.entity.EntityType type) Creates an instance of aEntitySelectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionPredicate<org.bukkit.entity.Entity> Returns the value of theentityCheckrecord component.Returns the value of theentityUUIDrecord component.final booleanIndicates whether some other object is "equal to" this one.List<? extends org.bukkit.entity.Entity> findEntities(MockCommandSource source) List<org.bukkit.entity.Player> findPlayers(MockCommandSource source) final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludesEntitiesrecord component.intReturns the value of themaxResultsrecord component.order()Returns the value of theorderrecord component.Returns the value of theplayerNamerecord component.booleanReturns the value of theselfSelectorrecord component.final StringtoString()Returns a string representation of this record class.org.bukkit.entity.EntityTypetype()Returns the value of thetyperecord component.
-
Field Details
-
ORDER_ARBITRARY
-
ORDER_NEAREST
-
ORDER_FURTHEST
-
ORDER_RANDOM
-
-
Constructor Details
-
EntitySelector
public EntitySelector(int maxResults, boolean includesEntities, EntitySelector.Order order, boolean selfSelector, String playerName, Predicate<org.bukkit.entity.Entity> entityCheck, UUID entityUUID, org.bukkit.entity.EntityType type) Creates an instance of aEntitySelectorrecord class.- Parameters:
maxResults- the value for themaxResultsrecord componentincludesEntities- the value for theincludesEntitiesrecord componentorder- the value for theorderrecord componentselfSelector- the value for theselfSelectorrecord componentplayerName- the value for theplayerNamerecord componententityCheck- the value for theentityCheckrecord componententityUUID- the value for theentityUUIDrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
findEntities
-
findPlayers
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
maxResults
public int maxResults()Returns the value of themaxResultsrecord component.- Returns:
- the value of the
maxResultsrecord component
-
includesEntities
public boolean includesEntities()Returns the value of theincludesEntitiesrecord component.- Returns:
- the value of the
includesEntitiesrecord component
-
order
Returns the value of theorderrecord component.- Returns:
- the value of the
orderrecord component
-
selfSelector
public boolean selfSelector()Returns the value of theselfSelectorrecord component.- Returns:
- the value of the
selfSelectorrecord component
-
playerName
Returns the value of theplayerNamerecord component.- Returns:
- the value of the
playerNamerecord component
-
entityCheck
Returns the value of theentityCheckrecord component.- Returns:
- the value of the
entityCheckrecord component
-
entityUUID
Returns the value of theentityUUIDrecord component.- Returns:
- the value of the
entityUUIDrecord component
-
type
public org.bukkit.entity.EntityType type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-