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.
@MecheUniverse
New build coming your way!
@josvth
not on my end lol
@MecheUniverse
Okay fixed!
@Adrenalineq
Very strange. It says there's an error on line 221 however there is no code what so ever on this line. Do you get this error often?
Hi im using random spawn with bukkit 1.4.2 recommended build. When a player dies. He/She gets kicked out giving the error below. When a player reconnects they are returned to they default random spawn. Error is not found once a bed is set. I'm sure it's because RS is not yet ready for 1.4.2. But, I figured this error could be helpful in case i'm only one getting this error on my server.
Failed to handle packet: java.lang.NullPointerException java.lang.NullPointerException at net.minecraft.server.ServerConfigurationManagerAbstract.moveToWorld(ServerConfigurationManagerAbstract.java:372) at net.minecraft.server.ServerConfigurationManagerAbstract.moveToWorld(ServerConfigurationManagerAbstract.java:322) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1100) at net.minecraft.server.Packet205ClientCommand.handle(SourceFile:30) at net.minecraft.server.NetworkManager.b(NetworkManager.java:282) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:111) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:569) at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:486) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)
Does this work with PermissionsEX? I cant seem to get the node for using signs to work with PEX.
@pineapplepinata
I'm glad to hear you like my plugin. However could you be so kind not to spam your server in the comments? Thanks!
Is anyone else having issues where it spawns you in water?
@Dr3x1
If you could send the contents of your worlds.yml and a list of the plugins you are using I might be able to find the problem. Please use something like Pastebin for this since the text in comments is often automaticly changed (tabs/spaces removed etc.)
@Jozeth
Does this happen everytime you respawn? Or just sometimes?
@ZeEye
Could be that some other plugin is interfering. Try disabling plugins that handle respawning (like Multiverse, Firstspawn .etc) and see if it fixs your problem.
@Unboxermail
I could add another line to the Random Spawn sign representing the spawn world. Good idea I will try to add it!
@Intangir
It could be that I messed up my mathematics some where. I'll try to take a look at it. Thanks for letting me know!
Make it possible to make signs able to teleport you from 1 world to another? Say for example, if I place a teleport sign in the world called "bukkit" and want people to teleport to "world"? That is a very useful feauture that is missing.
hi,
got a little problem here. First time joiner keep spawning at the mapspawn instead of random. The world got the - firstjoin flag. Any solution for that?
2012-09-18 21:17:09 [WARNING] Failed to handle packet: java.lang.NullPointerException java.lang.NullPointerException at net.minecraft.server.ServerConfigurationManagerAbstract.moveToWorld(ServerConfigurationManagerAbstract.java:370) at net.minecraft.server.ServerConfigurationManagerAbstract.moveToWorld(ServerConfigurationManagerAbstract.java:321) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1069) at net.minecraft.server.Packet205ClientCommand.handle(SourceFile:30) at net.minecraft.server.NetworkManager.b(NetworkManager.java:276) at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109) at net.minecraft.server.ServerConnection.b(SourceFile:35) at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:578) at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213) at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406) at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
Error when dying and respawning... Only with - respawn keeprandomspawns: true
the random spawn in circle trends toward the center of the circle at a really high rate..
like half the people spawned in visual range of 0,0...
out of a 5km radius
Bug: If someone is kicked or exits their client at the respawn screen after they die, when they rejoin they will spawn where they died. Fix Asap Please <3
@alexander_gq
Not possible without a big change in the way minecraft handles data, or spout client & server mod (I don't even know if it's been done with them yet).
A couple of ways to discourage repeatedly dying to teleport is a death-ban cooldown. Even something small like 1-2 minutes should be enough to make it not worth while.