diff --git a/examplemods/npcspawner.js b/examplemods/npcspawner.js index f06bc7c..5f2b0a9 100644 --- a/examplemods/npcspawner.js +++ b/examplemods/npcspawner.js @@ -4,7 +4,7 @@ if (!ModAPI.reflect.getClassById("net.minecraft.entity.player.EntityPlayerMP").instanceOf(event.sender.getRef())) { return } if (event.command.toLowerCase().startsWith("/spawnnpc")) { - const world = event.sender.getServerForPlayer(); + const world = event.sender.getEntityWorld(); const playerPos = event.sender.getPosition();