Population Density
Automatically places new players where they can find wood, animals, ore, and space to build. Also priority-based login queue, reserved slots for admins, idle boot ONLY when nearly full, entity thinning for lag reduction, and optional limited teleportation. Never again will your players experience a marathon run, spawn room full of portals, or maze of abandoned builds. This is a zero maintenance solution for administrators, and players don't need to learn any commands!
"This is THE plugin for large servers." – Mumblerit of muttsworldmine.com
Looking for a 1.12.2 or earlier-compatible version? Check here.
Got a question, suggestion, or problem? Post it on the issue tracker.
This video explains the region post system to new players.
See below for information on administrative features.
Feature Summary
- Assigns starting points for new players so that they can ALWAYS find space to build and beginner resources nearby. Players may be spawned directly there, or you can tell them about a slash command which will take them there.
- Respawns animals, regrows grass, and replants trees in the new player area to guarantee important new player resources.
- Removes idle players ONLY when the server is nearly full.
- Login queue to ensure fairness when your server is full, can prioritize some players over others if you like.
- Reserved slots for administrators.
- Optional teleportation posts which help players socialize and trade, but aren't abuse-able to escape combat or save a lost or hungry player.
- "Thins" extremely-dense crowds of monsters and animals, preventing ridiculous levels of farming or monster grinding from lagging your server.
Overview
Server owners often underestimate the badness in starting a player in a crowded area. Sure seeing builds makes your server look legitimate, but having to explore a long time just to find space to build and beginner resources is a major turn off for players who want to start playing right away. Even when players do find a place to start playing, they're often alone because other new players wandered into different areas.
PopulationDensity is the low-maintenance, easy-for-players answer to all these problems.
It works by automatically locating a region with lots of wood and ore, and then dropping new players in that region until they collect most of the easily accessible ore, cut down most of the trees, or crowd it with builds. Then PopulationDensity finds a new resource-wealthy region for future newbies and starts dropping new players there. If you have a great spawn area built up, you can instead spawn players there, and later tell them to use /HomeRegion when they're ready to start adventuring (or another command you define in commands.yml).
Additionally, optional teleportation commands help players move around quickly to admire builds and socialize while not compromising the game's integrity - players can only teleport from automatically-placed teleportation posts, so teleportation can't be used as an "easy-out" for players who mine or adventure themselves into trouble. That way, players keep the challenge of single player without the "players are too far apart" multiplayer issue.
Finally, if you have a "my server is always full" problem, then congratulations on your successful server! :) With PopulationDensity, you may optionally boot players who are idling so more players can log in and have fun, increasing your feel-good factor (or fattening your wallet, for some). when the server IS full, a login queue guarantees fairness, and administrative slots are set aside to guarantee administrators can always get in.
You can also assign players a queue priority to help them get on the server faster during peak times, to reward them for contributing to the server monetarily or through your community.
Requirements
- v6.0 and higher require Java 21
Setup, Configuration, and Commands documentation
Metrics: Like most other plugins this plugin collects anonymous metrics to see who's actually using this plugin, and this information is used to determine popularity as well as what features matter or not in the grand scheme of things.
Got a question, suggestion, or problem? Post it on the issue tracker.
@bigscary
Yeah, in fact because of the new timings implemented in paper, it will catch commands dispatched in async since that's not thread safe. It also caught another plugin I was using doing that as well.
Small feature request - I would actually prefer to have extra logging info as per this comment on this commit. I know you've been cleaning out log messages over the past several versions but I in fact like the log messages so I can see exactly what's going on regarding "performance cleanups." Perhaps you can re-add these with a "debug" option?
@madtomic
Spawn errors? What's a spawn error?
If folks want to live dangerously and use experimental server code, that's on them. Ideally I'd develop a version of every plugin I create for every server platform out there (spigot, paper spigot, forge, sponge...), but I don't make enough money from this work to turn it into a full time job. And it would be a full time job for me to support more than one platform (I've got a wife and two kids under 3, so free time is nearly at zero for me).
I fixed Chinafriend's error - turns out it reproduces on official spigot as well.
@kemmeo
My thinking was I don't want players to ever travel more than 400 blocks on foot (this was before horses were added) to get to their home or another player's location.
@Mankin59
You can change the materials used to create the post in the config file, but the shape can't be changed.
Is there anyway to customize region posts?
@madtomic
I use PaperSpigot and get no errors, perhaps it isn't the reason for the errors you get? Have you checked the paper.yml for any setting that might conflict with PopulationDensity?
@bigscary
Oh so that is why! Makes a lot more sense! I am curious, why 400 blocks apart? not that I want you to change it. Is it because they line up on maps as nicely as in your video demo'ing the plugin?
@bigscary
This is why I can't this plugin on my server. I also use paperspigot and it give spawn errors from time to time. Too bad,
You do realize that last three posts are users using PaperSpigot... Maybe you should consider supporting it. :)
@chinafriend
I don't support paperspigot, sorry.
@kemmeo
The docs explain that players are spread more apart, not the posts. ;) Decreasing density ratio means that a new post will be generated with fewer players blocks detected in the region, so you get more named regions faster over time, spreading new players out more.
Call me crazy, but I have been trying to increase the distance between region posts using "DensityRatio: 2.5" but even when generating a new world, the posts are still the same 400 blocks apart
tested with PopulationDensity 5.3 on PaperSpigot 1.8.8
[16:03:02] [Async Chat Thread - #4/ERROR]: Command Dispatched Async: lag [16:03:02] [Async Chat Thread - #4/ERROR]: Please notify author of plugin causing this execution to fix this bug! see: http://bit.ly/1oSiM6C java.lang.Throwable at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:647) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer.performCommand(CraftPlayer.java:243) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at me.ryanhamshire.PopulationDensity.PlayerEventHandler.onPlayerChat(PlayerEventHandler.java:376) [PopulationDensity5.4.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_66] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_66] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1.8.0_66] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.8.0_66] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:300) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:74) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:483) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at net.minecraft.server.v1_8_R3.PlayerConnection.chat(PlayerConnection.java:1111) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1026) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at net.minecraft.server.v1_8_R3.PacketPlayInChat$1.run(PacketPlayInChat.java:39) [PaperSpigot-1.8.8-R0.1-SNAPSHOT-latest.jar:git-PaperSpigot-56c14f8-07c3001] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_66] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_66] at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
Update 5.4 is here!
@SirPiggymon
Spawning them atop the post is for safety - some monsters can't reach them, and they're not high enough to take fall damage when they hop down.
@SirPiggymon
Thanks for that assist. :) I use city world == managed world on BeardCraft, to avoid having to add another plugin (multiverse or similar).
@SirPiggymon
Thanks for explaining it. Just setting the spawn world to the same as the managed world and increasing the distance from spawn config value works well enough. Thanks!
@Nentify
It basically allows you to use a different world for your world spawn, and is probably the best way for doing so with PopulationDensity. First, you will need to install Multiverse. Once you have Multiverse running, make a new world with any name, e.g.: /mv create spawn normal.
Now, in your PopulationDensity config, set NewPlayersSpawnInHomeRegion to false and CityWorldName to the name of the new spawn world (spawn). Finally, you need to set the default world in Multiverse (where spawn is the name of the new world) with /mv conf firstspawnoverride true and /mv conf firstspawnworld spawn.
To test, delete the .dat file with your UUID in the world/playerdata directory. Once users are ready to spawn at a post, they can use /homeregion. MaxDistanceFromSpawnToUseHomeRegion allows you to set how far a player can be from the spawn point to be able to run /homeregion (/mv set spawn will set spawn and /spawn will return you to spawn) and it should be the approximate radius of your spawn hub.
How does the city region thing work?
It would be nice if users can use the PD commands from spawn without having to go to a region post first (spawn isn't that near a region post). Is the whole world a city or is there a way to choose which region is the city at so users can use commands in it? What is the 'spawn' in terms of PD for "max distance away from spawn to use homeregion"?
Sorry, just a bit confused about it.
Thanks!
Is it possible for the player to be spawned at a defined location (& rotation) relative to the region post? Currently the players spawn on the corner of glowstone pillar.
@polarbearbob
I don't think it can work for your case. If your mod changes the world so much that PD doesn't know how to find resources, then it can never decide when to start putting players in a new place rather than the old one.
I am trying to get this to work with the regrowth modpack v0.8.6. (KCauldron-1.7.10-1517.168) the issue is there are no resources in the world. but I still want to spread out my users. is this possible?
Thank you,
@Belakian sorry for double post
I am trying to get this to work with the regrowth modpack v0.8.6. (KCauldron-1.7.10-1517.168) the issue is there are no resources in the world. but I still want to spread out my users. is this possible?
Thank you,
@Belakian
@bigscary
Oh well, thanks a lot for answering! Keep up your good work :)
Update 5.2 is here!
@kemmeo
Sorry no - super difficult to programmatically remove a region post. :\
Would it be possible for this plugin to have it where region posts only appear in the active home region? Meaning once a region becomes crowded the region post disappears, leaving only the one region post, acting as the home region where new players spawn.
@Sander0542
Please rephrase? What do you mean change the standard home region?