Fix NoSuchFieldError on Paper-Spigot 1.19.2 for SWorld#getLivingEntities

The field does not exist on Spigot (located in another class?).
But `#getEntities()` does exactly what we need and Paper-Spigot still has it.


SD-9374
SD-9377
SD-9392
SD-9401
This commit is contained in:
Christian Koop 2022-10-26 21:57:39 +02:00
parent 92c653d9be
commit 5f43578869
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
3 changed files with 3 additions and 3 deletions

View File

@ -134,7 +134,7 @@ public class NmsManager {
anvil = new com.songoda.core.nms.v1_19_R1.anvil.AnvilCore();
nbt = new com.songoda.core.nms.v1_19_R1.nbt.NBTCoreImpl();
world = new com.songoda.core.nms.v1_19_R1.world.WorldCoreImpl();
}else{
} else {
player = new com.songoda.core.nms.v1_19_R1v2.entity.NMSPlayerImpl();
anvil = new com.songoda.core.nms.v1_19_R1v2.anvil.AnvilCore();
nbt = new com.songoda.core.nms.v1_19_R1v2.nbt.NBTCoreImpl();

View File

@ -23,7 +23,7 @@ public class SWorldImpl implements SWorld {
List<LivingEntity> result = new ArrayList<>();
ServerLevel worldServer = ((CraftWorld) world).getHandle();
LevelEntityGetter<Entity> entities = worldServer.entityManager.getEntityGetter();
LevelEntityGetter<Entity> entities = worldServer.getEntities();
entities.getAll().forEach((mcEnt) -> {
org.bukkit.entity.Entity bukkitEntity = mcEnt.getBukkitEntity();

View File

@ -23,7 +23,7 @@ public class SWorldImpl implements SWorld {
List<LivingEntity> result = new ArrayList<>();
ServerLevel worldServer = ((CraftWorld) world).getHandle();
LevelEntityGetter<Entity> entities = worldServer.entityManager.getEntityGetter();
LevelEntityGetter<Entity> entities = worldServer.getEntities();
entities.getAll().forEach((mcEnt) -> {
org.bukkit.entity.Entity bukkitEntity = mcEnt.getBukkitEntity();