Package lol.pyr.znpcsplus.api.entity
Interface EntityPropertyRegistry
public interface EntityPropertyRegistry
Class responsible for providing entity property keys
Some property keys are only registered in certain situations for example different minecraft versions
-
Method Summary
Modifier and TypeMethodDescriptiongetAll()Get a property key by it's name<T> EntityProperty<T>Get a property key by it's name and automatically cast the property to the proper type If you don't know the type of the property you are requesting usegetByName(String)insteadvoidregisterDummy(String name, Class<?> type) Register a dummy property that can be used to store unique information per npc
-
Method Details
-
getAll
Collection<EntityProperty<?>> getAll()- Returns:
- All of the possible property keys
-
getByName
Get a property key by it's name- Parameters:
name- The name of a property key- Returns:
- The property key corresponding to the name or null if there is none
-
getByName
Get a property key by it's name and automatically cast the property to the proper type If you don't know the type of the property you are requesting usegetByName(String)instead- Type Parameters:
T- The expected type of the returned property key- Parameters:
name- The name of a property keytype- The class of the expected type of the returned property key- Returns:
- The property key corresponding to the name
-
registerDummy
Register a dummy property that can be used to store unique information per npc- Parameters:
name- The name of the new propertytype- The type of the new property
-