Pl3xSpawn
Description
Main focus on this plugin was the ability to have a random location for a world's spawn. Got tired of users destroying the land around my spawn. So instead of spending a few hours each week cleaning up the mess I decided to just spread the users out to random locations so there are no high traffic areas that get griefed.
Random locations is not the default. By default this plugin will use Bukkit's spawn location. You can override this location and specify a certain spot. From there you also have the optional ability to set a radius from the spot for a random location.
Note: Don't let the term "radius" confuse you. This is actually a box, and not a circle. Lets say your radius is 100 with the spawn point at 0,64,0. This simply means the random location can be anywhere between -100,0,-100 and 100,256,100. The y value is calculated to the highest available block that isn't air (or water/lava if safe-random-spawn is true).
Now supports configurable unsafe-blocks starting with v1.1!
Enjoy! ^_^
Commands
- /setspawn (random [radius]) Sets the current location you are standing in as the world's spawn point. Optional you can set a random radius to have a random location based around this location.
- /spawn (world) Teleports you to the world's spawn location. If no world specified the current world will be used.
Permissions
- pl3xspawn.setspawn Allows access to the /setspawn command.
- pl3xspawn.spawn Allows access to the /spawn command.
- pl3xspawn.spawn.changeworld Allows the user to specify the world in the /spawn command.
Default Config.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Enable debug info in console debug-mode: false # Enable colors in console output color-logs: true # Play enderman teleport sound when teleporting use-teleport-sounds: true # Force all players to the world's spawn when joining the server (override's last location) force-spawn-on-join: true # Force all players to the world's spawn when joining the server for the very first time force-spawn-on-new-join: true # Minimum allowed radius when using random locations min-random-radius: 10 # Maximum allowed radius when using random locations max-random-radius: 100 # Do not allow random locations over water or lava safe-random-spawn: true # Unsafe blocks. If safe-random-spawn is on a player will not teleport on the blocks listed here. # A Full list of items that can be used here http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html unsafe-blocks: - WATER - STATIONARY_WATER - LAVA - STATIONARY_LAVA - LEAVES |
- "unsafe-blocks" was implemented in v1.1
TODO
Have a suggestion? Leave a comment!
Metrics
This plugin uses metrics to collect stats! It only collect basic things such as version type, and players online. If you want to see everything, click on the graph. Go into /plugins/PluginMetrics/config.yml to disable stat collecting if you wish.
please help.When i set a spawn in a world then go to another world then disconnect to my server,when i join again i spawn on the world where i disconnected!please help.
Does this plugin work on the event of death?
@BillyGalbreath
Thanks for pointing that out. It works very well now.
@meiamone
Multiverse is indeed conflicting. You have to go into the MV configs and disable their spawn controls.
https://github.com/Multiverse/Multiverse-Core/wiki/World-properties#wiki-defaultspawn
No matter what I set new players still join at the minecraft default world spawn point. I can not get players to randomly spawn except by doing /spawn. Any ideas? I have worldborder plugin running as well as multiverse products. Are they conflicting? Perhaps multiverse spawn is overriding yours?
@BillyGalbreath
I believe the plugin PopulationDensity does something similar. It somehow detects that you are going to the world spawn and overrides this behaviour. It's GPL so you can take a look at how its done and perhaps borrow some of the code.
@deleted_7546711
Thats not a bad idea. I'll look into how the bed spawns work and see if I cant get this implemented this weekend. ^_^
There is one feature that I miss, but it could be hard to implement.
Currently players on my server spawn at a random point within 5000 blocks of the world spawn when they join for the first time. After that they spawn at their bed/home. If their bed is destroyed they spawn at the worlds default spawn point.
I would like them to spawn at a random location when their bed is destroyed. Is this possible to implement?
@deleted_7546711
Not a bad idea. I'll implement this soonDone. v1.1 should be approved soon.
Thanks for making this! I have been searching for a plugin like this one for the last few days. All the alternatives I have found are either very buggy or do a lot more than simply making spawns random.
@xXrobin99Xx You should check out boosCooldowns http://dev.bukkit.org/bukkit-plugins/booscooldowns/
By the way, I have a suggestion for a feature. I would like it to be possible to specify what blocks are considered when using safe-spawn.
I dont like that the players often spawn on tree tops, I could then add leaves to the list.
Can you add a Cooldown?