Random Spawn
Random Spawn is a simple plugin that spawns players at a random location in the world on their first login (configurable) and when they die. Sleeping in a bed disables the random spawn function and players will respawn at their bed when they die.
This is the first plugin I made. The idea for this plugin came from NuclearW's SpawnArea. I've used that for a while on my own server but thought it could use some extra features, so I tried to make one myself.
Thanks to NuclearW and Bretflann for being awesome and letting me use some of their code!
Thanks to WayGroovy and Francis Fenderson for donating!
Features:
- Random Spawn will not spawn players in:
- lava
- cacti
- water
- fire
- You can set a border where the players will random spawn inside
- After a player has lain or slept in a bed he won't be random spawned anymore and he will re-spawn at their bed if he dies
- This can be disabled when setting usebeds: false in the world.yml
- You can configure if players will be random spawned on there first join. (if false they will spawn at the map's default spawnpoint)
- you can set the first spawn location with the /setspawn command
- You can exclude players from being random spawned using the RandomSpawn.exclude permission node
- Random Spawn spawns players in a set area. You can define this area per world in the worlds.yml.
- Multiworld compatable
- Random Spawn signs. Type: [RandomSpawn] on the first line of a sign. To specify a world, type the world name on the second line. Configurable in config.yml.
- Custom messages after respawning.
- Spawning on command. since 2.4
When updating to version 1.6, please remove all the yml's and reconfigure them!
Commands:
See this page!
Permissions:
The permission nodes are optional.
- RandomSpawn.info Defaulted true
- RandomSpawn.help
- RandomSpawn.reload
- RandomSpawn.configure
- RandomSpawn.exclude
- RandomSpawn.setfirstspawn
- RandomSpawn.tpfirstspawn
- RandomSpawn.placesign
- RandomSpawn.usesign Defaulted true
- RandomSpawn.spawn
To-do list:
- Increase performance Increased performance a lot in version 1.6.1
- Circular spawn area's
- Any idea's?
Conflicting Plugins:
- SpawnX
Source available on Github!
If you like what I'm doing. Consider donating :) Please use the donate button in the top right.
@josvth
/setarea has a small chance of interfering with another plugin; it'd probably be best to use /rssetarea [radius].
Please make sure the areas are easily viewable in a file or something (like Borderguard's are), makes it much easier to remove and edit them.
I'm working on the new build in which I'm adding a lot of new commands. Do you guys have any requests on how these should work? For example should it be: /rs setarea or just /setarea?
Let me know what you think works the best.
@bigggan
The range wouldn't be a problem. But hooking into borderGuard is a little bit difficult since it isn't open source and I need to ask the author to cooperate.
But expect the commands to be there in the next build. (The next build will probably come a few days after the RB of Bukkit 1.0.0)
@josvth
yeah thats exactly what i wanted :P
Though it would be more like 3000 * 3000 blocks or more :P
With the border guard then this plugin would automaticly change the radius if i change the border.
@bigggan
How exactly do you see the borderGuard support? I could add a command that defines the spawn area to a radius around your current position. Like "/rsarea square 60 60" or something like that.
I would like to have it support borderGuard, or make a <Range from spawn> like if youre using spawn from Commandbook. so you can set a "square" in blocks around a fixed point.
@Pteraspidomorphi
Thanks for letting me know! I didn't thought about that.
Your plugin breaks if the world container path setting (from bukkit.yml) is used. You should account for that.
@Wedhro
Hello Wedhro!
I'm glad you like my plugin. :) Now for your questions:
The player can be spawn outside the already generated map. So if the random spawn point lies in a ungenerated chunk it will generate this chunk and a 10 chunk radius around it. There's a little server performance issue here. It can give server overloaded messages when a player respawns. But on the client side the respawning is very smooth because it loads the area first and then respawns.
There's no max distance limit form the death point. So if have a wide respawn area set in the config.yml you will be very unlikely to ever find your way home. My intention was that if you had a home you will already have slept in a bed, making your bed as your spawn point. But I'm thinking this will be a good feature to add if others like it too.
I love this plugin, it gives a Lost feeling to the game: the player loses consciousness then wakes up in an unknown place ("how did I get here?"). Cool!
Now some questions: the random spawn point can be outside the already generated map? There's a max distance limit from the death point? I'm worried the player may spawn 10.000 miles away and never find his way home.
@josvth
That's fine, thanks man, much appreciated :D
@AS1LV3RN1NJA
I've tested Multiverse and the problem is a bug in Multiverse. It's already on the issue tracker of Multiverse and confirmed as a bug. (Link to issue) I think it will be fixed soon. When it's fixed you should add " respawnworld: 'Chaos' " in your Chaos config file so players who die in chaos will respawn in Chaos. Random Spawn will notice the respawning of this player and will do it's job as it supposed do.
Conclusion: I'm afraid I can't fix your problem because it's a bug in Multiverse.
@AS1LV3RN1NJA
I'm testing Multiverse right now to see if its conflicting.
Could you tell me how your server is dealing with the lag when a player is respawning?
@josvth
Not too bothered about his requests personally. I think the plugin conflict for me may be Multiverse (I'll experiment next time I get the chance). Permissions would be great, thanks :D There's also a bug where my players die in Chaos (the only world RandomSpawn is enabled) and respawn in a bed in Survival (I've been thinking about removing beds as spawns, again Multiverse, but this may not be too popular a choice).
If you were to add database stuff, could you make it optional? I like the idea of this as quite a lightweight plugin.
Also, I say respawn, Google Chrome puts a red line under it, but I think it's correct (it looks better, anyways).
@ttamttam
Hello ttamttam!
I've read your requests. I'm not very into Request #1 because this requires a database file for the different spawn points of each player. I intended to keep this plugin very simple with a few configurations and without any databases. Did you notice that players won't be re-spawned randomly if they have lain or slept in a bed? (This feature was called in the description but forgot to add it in the Features list)
However, I like your second request. Adding some sort of radius to someone's spawn point where others can't be random spawned could be a very neat solution. This also requires a file that stores every spawn point. So if I add Request #2 it won't be difficult to add Request #1.
Since this is the only plugin that does this when dieing and a lot of people (including me) want to use it. I would try my best to make it as your requests.
Btw. Is it respawn of re-spawn?
@AS1LV3RN1NJA Could this be another plugin conflicting with Random Spawn? Because it makes no distinction between ops, admins or normal players.
Permissions are comming! I hope it will fix this problem.
Seems to be working for everyone but me (probably because i'm the admin, but it doesn't bother me at all). :D
I like the permissions idea, would probably work better than the current config setup.
@josvth
having a /setspawn command would be awesome :D
Also I have a couple requests if you could read them that would be awesome!
Request #1: Could you also add a option in the config to allow a players first random spawn to be their spawn?
e.g. player A joins the server and spawns randomly than dies and re spawns in the same spot
e.g. Player B joins a server with randomspawnonfirstjoin: false and dies, than re-spawns randomly, dies again and spawns at the same place he/she did last time.
Request #2: A way of keeping spawns from being too close to eachother
if you can't do any of these don't feel pressured to do so. Plugin looks awesome i think i'll get it once i get my server in order again!
@AS1LV3RN1NJA
I could see this coming. Tried SpawnX myself and I encountered the same problem. Other spawn plugins are very likely to conflict with Random Spawn since they all handle respawning. I could try to increase the priority but this wouldn't fix the problem if another spawn plugin has top priority too.
How about adding the setspawn function to the Random Spawn plugin? Or would you rather have 2 plugins?
Edit: Did you set the randomspawnonfirstjoin: false? If set to false players will spawn on the default spawnlocation at there first join.
Doesn't seem to be working, I think SpawnX is taking priority. Is there a way to make this "top priority" or something? If not, I'll try removing SpawnX.