public class MobManager extends SerializingComponent implements CasterRegistry
Modifier and Type | Field and Description |
---|---|
static boolean |
mountflag |
static boolean |
spawnflag |
Constructor and Description |
---|
MobManager(MythicMobs core) |
Modifier and Type | Method and Description |
---|---|
static String |
convertMobTypeAliases(String s) |
int |
despawnAllMobs()
Removes all despawnable mobs
|
MythicMob |
determineMobType(AbstractEntity l) |
static AbstractLocation |
findSafeSpawnLocation(AbstractLocation base,
int radius,
int mob_height) |
static AbstractLocation |
findSafeSpawnLocation(AbstractLocation base,
int radiusXZ,
int radiusY,
int mob_height) |
static AbstractLocation |
findSafeSpawnLocation(AbstractLocation base,
int radiusXZ,
int radiusY,
int mob_height,
boolean yMod) |
static AbstractLocation |
findSafeSpawnLocation(AbstractLocation b,
int radiusXZ,
int radiusY,
int mob_height,
boolean Ymod,
boolean onSurface) |
Optional<ActiveMob> |
getActiveMob(UUID uuid)
Returns the instance of a registered
|
Collection<ActiveMob> |
getActiveMobs()
Gets a collection of all active Mythic Mobs
|
Collection<ActiveMob> |
getActiveMobsInCombat()
Gets a collection of all active Mythic Mobs
that are currently in combat with something
|
List<org.bukkit.entity.LivingEntity> |
getAllMythicEntities() |
boolean |
getInCombat(ActiveMob am) |
Collection<String> |
getMobNames()
Gets a collection of all loaded mob names
|
Collection<ActiveMob> |
getMobsInCombat() |
Collection<MythicMobStack> |
getMobStacks()
Gets a collections of all loaded mob stacks
|
Collection<MythicMob> |
getMobTypes()
Gets a collection of all loaded mob types
|
MythicMob |
getMythicMob(String s) |
MythicMob |
getMythicMobByDisplayCompat(AbstractEntity l) |
ActiveMob |
getMythicMobInstance(AbstractEntity target) |
ActiveMob |
getMythicMobInstance(org.bukkit.entity.Entity target) |
static int |
getMythicMobLevel(MythicMob mm,
AbstractEntity l) |
MythicMobStack |
getMythicMobStack(String s) |
Optional<SkillCaster> |
getSkillCaster(UUID uuid) |
Optional<MythicMob> |
getVanillaType(MythicEntityType type)
Returns the vanilla override for the given MythicEntityType
if an override for that type has been loaded
|
Collection<MythicMob> |
getVanillaTypes()
Gets a collection of all mob types that are Vanilla overrides
|
Set<UUID> |
getVoidList()
Returns a list of UUIDs representing all non-MythicMobs seen
|
boolean |
isActiveMob(AbstractEntity entity)
Returns whether an entity is a registered Mythic Mob
|
boolean |
isActiveMob(UUID uuid)
Returns whether a UUID corresponds to a registered Mythic Mob
|
boolean |
isIgnoredEntity(UUID uuid)
Returns if the entity is a non-MythicMob to be ignored
|
void |
load(MythicMobs plugin) |
void |
loadMobs()
Loads all mob types from files in the Mobs folder
|
ActiveMob |
registerActiveMob(AbstractEntity l) |
ActiveMob |
registerActiveMob(AbstractEntity l,
MythicMob mm,
int level) |
ActiveMob |
registerActiveMob(ActiveMob am) |
int |
removeAllAllMobs()
Removes all active mobs
|
int |
removeAllMobs()
Removes all active mobs that are not persistent
|
void |
saveCachedActiveMobs() |
void |
ScanWorld() |
void |
setEntityDespawned(UUID uniqueId)
Mark that an entity in the world has despawned
|
void |
setIgnoreEntity(UUID uuid)
Marks the entity as non-Mythic so that it is ignored later
|
void |
setInCombat(ActiveMob am,
boolean b) |
static void |
setMetaData(AbstractEntity abstractEntity,
String s,
String key) |
void |
SetupMythicMobCompat(org.bukkit.entity.LivingEntity l,
MythicMob mm) |
ActiveMob |
spawnMob(String type,
AbstractLocation loc) |
ActiveMob |
spawnMob(String type,
AbstractLocation loc,
double level) |
ActiveMob |
spawnMob(String type,
AbstractLocation loc,
SpawnReason reason,
double level) |
ActiveMob |
spawnMob(String type,
org.bukkit.Location loc) |
ActiveMob |
spawnMob(String type,
org.bukkit.Location loc,
double level) |
void |
unload() |
void |
unregisterActiveMob(ActiveMob am) |
void |
unregisterActiveMob(UUID u) |
void |
verifyMythicMobInstance(AbstractEntity e) |
doBinding, getBasedir, getGSON, getModuleDirectory, getModuleFile, getModuleFiles, getModuleFiles, loadFile, loadJson, saveFile, saveJson
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MobManager(MythicMobs core)
public void load(MythicMobs plugin)
load
in class io.lumine.utils.plugin.PluginModule<MythicMobs>
public void unload()
unload
in class io.lumine.utils.plugin.PluginModule<MythicMobs>
public void loadMobs()
public Collection<MythicMob> getMobTypes()
public Collection<String> getMobNames()
public Collection<MythicMob> getVanillaTypes()
public Optional<MythicMob> getVanillaType(MythicEntityType type)
type
- The MythicEntityType to findpublic Collection<MythicMobStack> getMobStacks()
public Optional<SkillCaster> getSkillCaster(UUID uuid)
getSkillCaster
in interface CasterRegistry
public Collection<ActiveMob> getActiveMobs()
public Collection<ActiveMob> getActiveMobsInCombat()
public boolean isActiveMob(AbstractEntity entity)
entity
- The AbstractEntity to checkpublic boolean isActiveMob(UUID uuid)
uuid
- The UUID to checkpublic Optional<ActiveMob> getActiveMob(UUID uuid)
uuid
- public Set<UUID> getVoidList()
public void setIgnoreEntity(UUID uuid)
uuid
- public boolean isIgnoredEntity(UUID uuid)
uuid
- public int removeAllMobs()
public int removeAllAllMobs()
public int despawnAllMobs()
public void setEntityDespawned(UUID uniqueId)
uniqueId
- public void ScanWorld()
public ActiveMob registerActiveMob(AbstractEntity l, MythicMob mm, int level)
public ActiveMob registerActiveMob(AbstractEntity l)
public void unregisterActiveMob(UUID u)
public void unregisterActiveMob(ActiveMob am)
public ActiveMob getMythicMobInstance(org.bukkit.entity.Entity target)
public ActiveMob getMythicMobInstance(AbstractEntity target)
public void verifyMythicMobInstance(AbstractEntity e)
public ActiveMob spawnMob(String type, AbstractLocation loc)
public ActiveMob spawnMob(String type, AbstractLocation loc, double level)
public ActiveMob spawnMob(String type, AbstractLocation loc, SpawnReason reason, double level)
public void SetupMythicMobCompat(org.bukkit.entity.LivingEntity l, MythicMob mm)
public static AbstractLocation findSafeSpawnLocation(AbstractLocation b, int radiusXZ, int radiusY, int mob_height, boolean Ymod, boolean onSurface)
public static AbstractLocation findSafeSpawnLocation(AbstractLocation base, int radiusXZ, int radiusY, int mob_height, boolean yMod)
public static AbstractLocation findSafeSpawnLocation(AbstractLocation base, int radiusXZ, int radiusY, int mob_height)
public static AbstractLocation findSafeSpawnLocation(AbstractLocation base, int radius, int mob_height)
public Collection<ActiveMob> getMobsInCombat()
public boolean getInCombat(ActiveMob am)
public void setInCombat(ActiveMob am, boolean b)
public void saveCachedActiveMobs()
public List<org.bukkit.entity.LivingEntity> getAllMythicEntities()
public MythicMobStack getMythicMobStack(String s)
public static int getMythicMobLevel(MythicMob mm, AbstractEntity l)
public static void setMetaData(AbstractEntity abstractEntity, String s, String key)
public MythicMob determineMobType(AbstractEntity l)
public MythicMob getMythicMobByDisplayCompat(AbstractEntity l)
Copyright © 2020. All rights reserved.