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 I can't disable MultiVerse's spawn functions, so I tried using it with MultiWorld (the one you say it works with). I still experience the same issue. I spawn at a certain location that does not change.
@josvth
Your solution worked! Thank you so much!
On another note, there's definitely a plugin conflict on my side that prevents users from spawning in the same location they random spawned after death. I'm almost 100% positive it is Essentials, but this is the scenario:
User spawns in quiz area. User completes quiz and walks into another area, the main spawn. From the main spawn, the player jumps into an end portal which takes them to the world which has random spawning. User is randomly spawned correctly. Player dies. Player head back to the main spawn point, jumps back into the end portal, and random spawns at an entirely different location. Any ideas?
Keep random spawns is set to true.
EDIT: Request colours for RS message after spawning? :)
@TerraVale
The first join is not world specific it only checks the first join of the player in the server. If the world the player starts in has the first join flag then they will be random spawned. You could use the flag 'teleport-from-<yourmazequizworld>' then if the player is teleported from the quiz world to the random spawn world they are random spawned.
PS. This is the default co fig, the configurable: 'randomspawnenabled' is from an old version and isn't necessary any more.
exampleworld:
randomspawnon:
- respawn
- bedrespawn
- firstjoin
keeprandomspawns: false
spawnarea:
type: "square"
x-min: -100
x-max: 100
z-min: -100
z-max: 100
@Raptor2213
Check if Multiverse isn't overwriting the spawning of players. Look if you can disable something in the config file of Multiverse.
@saintchuck
Pre generating a world, not using the first join function but drop the players in lava instead. What have you tried?
a LOT of my players are spawning in a wall. Any idea how to fix?
Odd, because I don't have the randomspawnenabled: true node at all!
And you're also missing the type: square node in 'spawnarea'.
spawnarea:
type: square
x-min: -1000
x-max: 1000
z-min: -1000
z-max: 1000
@TerraVale That is the config from the plugin. I even tried activating it through in-game commands, and this is what it stuck in the file...
@Raptor2213
My world is not either. I have users join in a different world, go through a 3 question maze-quiz to verify they're human (not really for that reason) and end up at a new area on the same spawn map. From this new area, they can then teleport to the world which I need random spawning on, but even with '- firstjoin' it doesn't randomly spawn, or give you a message regarding random spawning.
However in your case, it looks like your configuration (might) be out of date. From a personal point of view with lacking experience in this plugin, I would suggest reloading the configuration from the plugin, and editing that!
I'm also experiencing trouble with the mod. It's not randomly spawning, at all. I'm using a pre-generated world with MultiVerse. Everyone spawns in the same location.
Config:
Hello josvth.
I need to speak to you on skype as soon as possible, I have a problem with your plugin and I can't repair it...
It's like, when I connect myself, I random spawn well, but when I disconnect/reconnect, I spawn in a stuckplace and die by suffocation, then re-respawn randomly...
And when I die normally, I respawn random normally. This work. :)
Oh, and another problem : when I and my players spawns, we fall though the ground during a long time, that's really annoying...
Please reply to me as quick as possible or add me on Skype, I must launch my server in a few hours ! ;)
My skype : scantoine
Thanks, bro ! (Still a very nice plugin :D)
@sagethor
My apologies there is a logical error in the 2.2 version. [[https://dl.dropbox.com/u/29941160/RandomSpawn-2.2.1.jar|Here] ]is the 2.2.1 version which fixes your first problem. Do you have your world pre generated? Because -5000 by 5000 is pretty big and if the server has to generate 21 x 21 chunks (yes this is correct) in a matter of seconds it causes the server to lag out and the new player will fall through the ground.
EDIT: I added a fix for the players being kicked as well. They shouldn't be kicked any more but they can still fall though the ground.
Plugin doesn't quite work properly for me. Logging in causes players to be respawned in a new area after being kicked for moving too fast and falling through the world. Using version 2.2, this is my configuration.
world: randomspawnon: - respawn - firstjoin keeprandomspawns: false spawnarea: type: "square" x-min: -5000 x-max: 5000 z-min: -5000 z-max: 5000
EDIT: Reverting to version 2.1 fixes my problems.
Any idea's?
how about add inner and outer radius of spawn? i mean something like this madskillz
@josvth
I got it to fix, I actually didn't change anything but eventually after a few restarts it worked. Thanks anyways!
Also, my players almost always spawn in a cave. Is there any way to disable spawning on stone,ore,etc? Or will I have to try to edit the plugin :P
@xPuyttre
Ah.. Well we will go down the troubleshooting list then.
First of all is your world named "world"? If yes than please check if there are any plugins like Multi verse interfering.
I'm trying to make it so that when someone first joins my server, they randomly spawn.
I looked at the config setup and I tried to make it work, but it still spawns in the same spot every time, even with new players.
worlds.yml:
@josvth
I have multiverse :( I previously went through and readded my plugins one by one until it didn't work, and the only one it doesnt work for is Pex. I jsut tried removing multiverse and it still worked but when i readded PEX it stops working and takes me to the world spawn. Here is my world.yml: http://pastebin.com/NeCEQB3d
@saintchuck
You don't need any permissions to use this plugin. Check your worlds.yml if it's configured properly and see if there's not a plugin (like Multiverse) interfering.
It says permissions are optional but it doesn't work with PEX on my server. Any nodes i need to add?