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.
could you please point me to a source code for this project? I love the idea and also would like to learn from what you coded to improve my CB skills :-) thanks!
@FabianNor
You could try what AS1LV3RN1NJA says.
If it doesn't work I will add this to my to-do list. I was already planning to improve the multi world support. So if you have more suggestions let me know!
@FabianNor Use the respawnworld value in multiverse.
Does this plugin allow me to direct deaths from multiple worlds to a single world? I'm using multiverse to manage the multiple worlds and have disabled multiverse's spawn handling and at the moment when I die in another world I respawn at the default world's server.properties spawn.
@AS1LV3RN1NJA
Yes, it is ready.
There will be no 1.1-R4 version. 1.7 will probably be on CB 1.2, unless you have noticed bugs or problems in version 1.6.3b.
Will RandomSpawn be R5 ready?
@manyamile
Great to hear that you like my plugin!
If you have any suggestions let me know.
@manyamile
That's similar to what I have in my chaos world, if you want to come on my server to see how it works in practice: http://silverserver.weebly.com/index.html
Just so long as you don't mention you're server name or IP, we're good :D
I just wanted to say thank you for putting this together. I plan to use it on a Hardcore/Deathban SMP server.
My plan is to use WorldBorder to set a limit on the map size, enable /rsrandomspawnonfirstjoin, and then define /rssetarea to match the radius of the map. This will force new players to join the world at a random point which should mitigate the problem that many hardcore servers have with spawn campers killing new players.
I'm using CityWorld, a pre-generated terrain, for a 'zombie apocalypse' themed survival server. As players use an area, it tends to become decimated. I also use local chat limited to 600 blocks, with randomspawn putting players at +/- 800 from the calculated center.
So, if a group of new players log in together, they have a likelyhood of landing in newish terrain, closeish to each other. They might have to hunt and peck to find each other.
Players that have been playing a while have a higher risk the longer they play with a bed.
If I were to simply expand the randomspawn area over time, then groups that logged in together would be scattered across a farther space.
@WayGroovy
Well I'm always interested in where people use my plugin for. So that I can improve its working.
Could you explain to me why randomly chosing the center point of the spawn area works better for you than just making the spawn area bigger?
I didn't even attempt using the /rsreload command, I was using PluginReloader to /plugin reload RandomSpawn, but now that I see that /rsreload is an option, I'll give that a try.
I use McMyAdmin as my frontend, so it's easy to run the python script, then the next minute run a console command /rsreload.
It'd be nice to see if I can run .sh scripts that feed commands directly to the console, but not sure if I'll be able to, with MCMA running in screen on root...
I have much to learn.
If you'd like to add wandering center, feel free to take my idea and implement it, if you so wish. I'm using it on a server with pre-generated city terrain, modified mobs ai and behaviors, to give new players a chance to get to new areas.
@WayGroovy
Hello WayGroovy! Big thanks for donating! It will be of great use.
Nice Python script! But doesn't it require you to use the /rsreload command after you've run your script?
Thanks, this is pretty nice.
I have written up the follow python script to randomly move the center of my spawn area, which I have scripted to run each day.
http://pastebin.com/AqEmGidb
Yeah, that fixed the problem. Thank you.
@vedelvend
I think I've found a problem. The spawnlocations.yml file didn't save on the right moment.
Try this build: http:dl.dropbox.com/u/29941160/RandomSpawn-1.6.2.jar
@vedelvend
Try it on R3 unless you need R4 for something.
also
@josvth
Haven't seen anyone else get kicked, so it was probably either lag or they were flying.
Tested 1.6.2 and I still have the problem i reported earlier - spawn locations are lost every time I restart the server. Running Craftbukkit 1.1-R4-SNAPSHOT. My configuration:
world: randomspawnenabled: true usebeds: true keeprandomspawns: true spawnarea: x-min: -3000 x-max: 3000 z-min: -3000 z-max: 3000 randomspawnonfirstjoin: true
I really like this plugin, but this bug is a dealbreaker for me. Let me know if there's any additional information I could provide or something I should check.
@josvth
I am using NoCheat, with default settings, but I haven't been able to reproduce the bug. Getting a bit late now, but i'll test a bit tommorow for you if I have time.
@AS1LV3RN1NJA
Great solution! I will remove the teleport to the sky when clicking a Random Spawn sign. Are you sure it's not an anti cheat plugin causing the kicking? Because if it is bukkits build in anti flight checking it could become a problem on other servers aswell.