Class EntityData.EntityDataPatterns<Data>
java.lang.Object
org.skriptlang.skript.bukkit.entity.EntityData.EntityDataPatterns<Data>
- Type Parameters:
Data- The type of object representing the state(s) of the entities in theEntityData.PatternGroups.
- Enclosing class:
EntityData<E extends org.bukkit.entity.Entity>
Collection of
EntityData.PatternGroups to be parsed and retrieved.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetData(int index) Gets the data of theEntityData.PatternGroupat theindex.protected Map<Data, EntityData.PatternGroup<Data>> Gets the generic group.protected Map<Integer, EntityData.PatternGroup<Data>> Gets theMapthat correlates index to aEntityData.PatternGroup.intGets the index that theEntityData.PatternGroupwithdata.getName(int index) getNames()Gets theGeneralNouns from all theEntityData.PatternGroups.getPatternGroup(int index) Gets theEntityData.PatternGroupcorrelating toindex.getPatternGroup(Data data) Gets theEntityData.PatternGroupcorrelating todata.Gets theEntityData.PatternGroups provided when constructed.static <Data> EntityData.EntityDataPatterns<Data> Create a simpleEntityData.EntityDataPatternswith only oneEntityData.PatternGroupfrom the provided parameters.static EntityData.EntityDataPatterns<?> Create a simpleEntityData.EntityDataPatternswith only oneEntityData.PatternGroupfrom the provided parameters.
-
Constructor Details
-
EntityDataPatterns
-
-
Method Details
-
single
Create a simpleEntityData.EntityDataPatternswith only oneEntityData.PatternGroupfrom the provided parameters.- Parameters:
name- The name of the entity.patterns- The patterns that refer to the entity.- Returns:
- The constructed
EntityData.EntityDataPatterns.
-
single
public static <Data> EntityData.EntityDataPatterns<Data> single(String name, @Nullable Data data, String... patterns) Create a simpleEntityData.EntityDataPatternswith only oneEntityData.PatternGroupfrom the provided parameters.- Type Parameters:
Data- The type of data correlating to the entity.- Parameters:
name- The name of the entity.data- The data correlating to the entity.patterns- The patterns that refer to the entity.- Returns:
- The constructed
EntityData.EntityDataPatterns.
-
getGenericGroup
Gets the generic group. A group is considered generic when it does not correlate to anyData.- Returns:
- The generic group.
-
getNames
Gets theGeneralNouns from all theEntityData.PatternGroups.- Returns:
- The
GeneralNouns.
-
getPatternGroups
Gets theEntityData.PatternGroups provided when constructed.- Returns:
- The
EntityData.PatternGroups.
-
getGroupMap
Gets theMapthat correlates index to aEntityData.PatternGroup.- Returns:
- The
Map.
-
getDataMap
- Returns:
- The
Map.
-
getPatternGroup
Gets theEntityData.PatternGroupcorrelating toindex.- Parameters:
index- The index of theEntityData.PatternGroupto grab.- Returns:
- The
EntityData.PatternGroupif found, otherwise the generic group.
-
getPatternGroup
Gets theEntityData.PatternGroupcorrelating todata.- Parameters:
data- The data of theEntityData.PatternGroupto grab.- Returns:
- The
EntityData.PatternGroupif found, otherwise the generic group.
-
getIndex
Gets the index that theEntityData.PatternGroupwithdata.- Parameters:
data- The data of theEntityData.PatternGroupto grab the index from.- Returns:
- The index.
-
getData
Gets the data of theEntityData.PatternGroupat theindex.- Parameters:
index- The index of theEntityData.PatternGroupto grab the data from.- Returns:
- The data.
-
getName
- Parameters:
index- The index ofEntityData.PatternGroupto grab theGeneralNounfrom.- Returns:
- The
GeneralNoun.
-
getName
- Parameters:
data- The data of theEntityData.PatternGroupto grab theGeneralNounfrom.- Returns:
- The
GeneralNoun.
-