https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Chunk.html#getInhabitedTime() states that "Note that the time is incremented once per tick per player in the chunk." however this seems to be incorrect, looking at NMS the chunk inhabited time is increased if a player is nearby for mobs to spawn not if they are inside the chunk. I confirmed this by making a small plugin to spam the inhabited time for the chunk at 0, 0 and moved around it. The time increases if I'm outside of the chunk.
Chunk chunk = Bukkit.getWorld("world").getChunkAt(0, 0); Random random = new Random(); Bukkit.getScheduler().runTaskTimer(this, () -> { for (int x = 0; x <= 15; ++x) { for (int y = 0; y <= 255; ++y) { for (int z = 0; z <= 15; ++z) { if (random.nextBoolean()) { chunk.getBlock(x, y, z).getWorld().spawnParticle(Particle.TOTEM, chunk.getBlock(x, y, z).getLocation(), 1, 0, 0, 0, 0); } } } } Bukkit.broadcastMessage("Time: " + chunk.getInhabitedTime()); }, 60, 5);