... | @@ -60,7 +60,7 @@ Examples |
... | @@ -60,7 +60,7 @@ Examples |
|
```java
|
|
```java
|
|
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs(am -> am.getMobType().equals("SkeletalKnight"));
|
|
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs(am -> am.getMobType().equals("SkeletalKnight"));
|
|
|
|
|
|
//or use the Streams api
|
|
//or use the Streams api
|
|
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs();
|
|
Collection<ActiveMob> activeMobs = MythicBukkit.inst().getMobManager().getActiveMobs();
|
|
Collection<ActiveMob> filteredMobs = activeMobs.stream().filter(activeMob -> activeMob.getMobType().equals("SkeletalKnight")).toList();
|
|
Collection<ActiveMob> filteredMobs = activeMobs.stream().filter(activeMob -> activeMob.getMobType().equals("SkeletalKnight")).toList();
|
|
```
|
|
```
|
... | | ... | |