... | ... | @@ -82,7 +82,7 @@ if(mob != null){ |
|
|
}
|
|
|
```
|
|
|
|
|
|
### Check if a bukkit entity is a MythicMob
|
|
|
### Check if a Bukkit Entity is a MythicMob
|
|
|
```java
|
|
|
Entity bukkitEntity = ...;
|
|
|
boolean isMythicMob = MythicBukkit.inst().getMobManager().isMythicMob(bukkitEntity);
|
... | ... | @@ -91,6 +91,15 @@ if(isMythicMob){ |
|
|
}
|
|
|
```
|
|
|
|
|
|
### Get ActiveMob instance from Bukkit Entity
|
|
|
```java
|
|
|
Entity bukkitEntity = ...;
|
|
|
Optional<ActiveMob> optActiveMob = MythicBukkit.inst().getMobManager().getActiveMob(bukkitEntity.getUniqueId());
|
|
|
optActiveMob.ifPresent(activeMob -> {
|
|
|
//...
|
|
|
}).orElse(() -> /* ... */);
|
|
|
```
|
|
|
|
|
|
### Get a collection of ActiveMobs using a predicate
|
|
|
```java
|
|
|
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs(am -> am.getMobType().equals("SkeletalKnight"));
|
... | ... | |