public class MobMatcher extends TextParser<java.util.List<java.lang.Short>>
Constructor and Description |
---|
MobMatcher() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Short> |
getCategoryFromName(java.lang.String text)
Retrieves the category with the same ENUM name, or NULL if no such category exists.
|
java.lang.Short |
getMobFromName(java.lang.String text)
Retrieves the mob with the same ENUM name, or NULL if no such mob is registered.
|
java.util.Collection<java.lang.String> |
getRegisteredCategories()
Retrieves a collection of currently registered categories.
|
java.util.Collection<java.lang.String> |
getRegisteredMobs()
Retrieves a collection of currently registered mobs.
|
protected void |
loadDefaultCategories() |
protected void |
loadDefaultMobs() |
java.util.List<java.lang.Short> |
parse(java.lang.String text)
Transforms the given text into an object.
|
void |
registerCategory(java.lang.String categoryName,
org.bukkit.entity.EntityType... types)
Registers a category with the given name.
|
void |
registerCategory(java.lang.String categoryName,
java.lang.Short... types)
Registers a category with the given name.
|
void |
registerMob(java.lang.String mobName,
java.lang.Short id)
Register an individual mob.
|
java.util.List<java.lang.Short> |
unregisterCategory(java.lang.String categoryName)
Unregisters the given category.
|
java.lang.Short |
unregisterMob(java.lang.String mobName)
Unregisters an individual mob.
|
getParameterQueue, parse, tryParse, tryParse
protected void loadDefaultCategories()
protected void loadDefaultMobs()
public java.util.List<java.lang.Short> getCategoryFromName(java.lang.String text)
text
- - name of the category to find.public java.lang.Short getMobFromName(java.lang.String text)
text
- - name of the mob to find.public void registerCategory(java.lang.String categoryName, org.bukkit.entity.EntityType... types)
categoryName
- - name of the category.types
- - list of mobs in that category.public void registerCategory(java.lang.String categoryName, java.lang.Short... types)
categoryName
- - name of the category.types
- - list of mob ids in that category.public java.util.List<java.lang.Short> unregisterCategory(java.lang.String categoryName)
categoryName
- - name of the category to unregister.public java.util.Collection<java.lang.String> getRegisteredCategories()
public void registerMob(java.lang.String mobName, java.lang.Short id)
mobName
- - ENUM name of the mob.id
- - the unique type ID of the mob.public java.lang.Short unregisterMob(java.lang.String mobName)
mobName
- - name of the mob to unregister.public java.util.Collection<java.lang.String> getRegisteredMobs()
public java.util.List<java.lang.Short> parse(java.lang.String text) throws ParsingException
TextParser
parse
in class TextParser<java.util.List<java.lang.Short>>
text
- - text to parse.ParsingException
- The text cannot be transformed into a list of objects.