Events, Spawns, Source Servers, and many more!

User Tools

Site Tools


mobsistence:main-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mobsistence:main-api [2015/01/14 22:56] (current)
sylian created
Line 1: Line 1:
 +The API class has the following methods
  
 +==== CountMobsInWorld ====
 +== Counts how many mobs are in the collection for a given world ==
 +Parameters: World | world name\\
 +Returns: the count or -1 if the world isn't active in the config
 +----
 +==== FindAllMobsInWorld ====
 +== Grabs all the mobs in a world'​s collection ==
 +Parameters: World | world name\\
 +Returns: a map of mobs stored by unique id or an empty map if the world is invalid or inactive
 +----
 +==== IsMobActive ====
 +== Checks if a mob is in a world'​s collection ==
 +Parameters: LivingEntity | World and mob id | world name and mob id\\
 +Returns: true if the mob is in the world'​s collection, or false if it isn't or a parameter is invalid
 +----
 +==== RemoveAllMobs ====
 +== Empties a world'​s collection ==
 +Parameters: World | world name\\
 +----
 +==== RemoveMob ====
 +== Removes a mob from a world'​s collection ==
 +Parameters: LivingEntity | World and mob id | world name and mob id\\
 +----
 +==== StoreMob ====
 +== Places a mob in a world'​s collection ==
 +Parameters: LivingEntity | Mob\\or world name\\
 +Notes: using a LivingEntity as the parameter will store a mob with no metadata. The plugin will automatically remove all such mobs when it shuts down unless some later event has added some metadata
 +----
 +==== TryFindMob ====
 +== Grabs a specific mob from a world'​s collection ==
 +Parameters: LivingEntity | World and mob id | world name and mob id\\
 +Returns: a Mob or null if the mob isn't in the collection or a parameter is invalid
mobsistence/main-api.txt ยท Last modified: 2015/01/14 22:56 by sylian