HomeSpawnPlus
HomeSpawnPlus (HSP) / SpawnControl: the most advanced Home/Spawn plugin for Bukkit. HSP has flexible events and strategies that you can customize for your unique needs. If you just want dead-simple home/spawn management, HSP can do that too, but you might find some other plugin easier to setup or understand. If you want full control and maximum flexibility to do whatever YOU want and not be limited by just basic /home and /spawn functionality, then HSP might be for you.
HSP's events and strategies, custom commands and integrations with plugins like WorldGuard and Multiverse allow you to completely control every aspect of spawns and homes, so that unique edge or setup you want, chances are good that HSP can do it for you.
Please read the FAQ before posting questions or tickets (especially Essentials users). Also there are Examples.
Versions
- Official releases are on the Files tab of this page
- Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk. Jenkins
HomeSpawnPlus has these Features:
- Multi-world homes (one-home per world, multiple homes per world or even just one global home, your choice)
- Specific control as to what happens on events such as player login, player death, typing /spawn or /home commands using strategies. Should the user always stay on the same world? Spawn at the nearest of multiple spawns (ie. graveyard concept)? Maybe they always go to a specific group spawn on that world (for PvP factions, perhaps)? Your choice.
- Ability to set a one-time new player spawn point
- Cooldowns and warmups Can be set to cancel on movement or damage. Advanced details here.
- Economy support (via Vault) to optionally charge players for commands
- Home limits, definable per-group or per-permission. More documentation.
- Configurable per-world or per-permission for just about every option (events, cooldowns, warmups, costs, homeLimits)
- Define your own custom commands Documentation here
- WorldGuard region-spawn support (allow people to spawn at WG region spawn when inside that WG region)
- Ability to visit homes other people have set, on any world (controlled by Permissions)
- Language localization Also you can customize any message in HSP. Details here.
- Home invites - documentation here
- Set homes by clicking on a bed: read bed-related options documentation.
- Dynmap integration built in, very configurable to meet your own needs
- Persistence choice: Sqlite (default), MySQL or YAML
- Standard YML config.yml: with live reloading in-game (/hsp rc)
- Import home data from other plugins (Essentials 2.9, CommandBook 2.1 and SpawnControl v0.8)
Installation:
- Download HomeSpawnPlus.jar and put it in your Bukkit plugins folder
- Startup Bukkit, HomeSpawnPlus will automatically put the default config.yml into plugins/HomeSpawnPlus/config.yml
- Configure config.yml to your liking, then either '/hsp rc' to live reload the config, or restart your server.
Additional info
This plugin was designed to work with Vault, WEPIF, PEX, Permissions 2.x/3.x, or any Superperms-compatible plugin. Please read more about permissions here.
Under the hood: How HSP works
Examples
Spawn strategy documentation
Advanced Cooldown and Warmup information
User Command Reference
Admin Command Reference
Permissions
Changelog
Source Code
Metrics plugin
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
A unique identifier The server's version of Java Whether the server is in offline or online mode The plugin's version The server's version The OS version/name and architecture The core count for the CPU The number of players online The Metrics version
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
Have an issue? Got a new idea?
If you find a bug or have an enhancement request, please create a ticket so I don't lose track of the request or issue in a comment stream. If you have a basic question, feel free to post in the comments here or visit the forums on forums.bukkit.org.
Thanks to @Timberjaw for the awesome work on SpawnControl that gave me a great base to start from!
-
View User Profile
-
Send Message
Posted Dec 11, 2013@InfroCZE
Also I just watched your video, thanks for taking detailed notes. It looks like your /spawn and /setspawn commands are being consumed by another plugin. Try using "/hspspawn" and "/hspsetspawn", you'll probably see different results. If the HSP results are the one you want, then read the FAQ about permanently remapping your command aliases to spawn/setspawn point to HSP instead of the other plugin.
-
View User Profile
-
Send Message
Posted Dec 11, 2013@InfroCZE
Glad you like the plugin. Bukkit offers six priorities, LOWEST through HIGHEST and one final priority, MONITOR. Though, to my recollection, the Bukkit API doesn't guarantee particular ordering if two plugins share priority, in practice I recall it works out to be FIFO, such that the last plugin to register for an event "wins". Bukkit loads plugins alphabetically, so in this case if both HSP and SkyBlock are registering HIGHEST, SkyBlock is loaded second and therefore has "final say".
The most immediate fix is to just rename HomeSpawnPlus.jar to something like "zHomeSpawnPlus.jar", it will now be registered last and have final say. Of course the downside is every time you update HSP, you have to remember to make this change.
Another fix is that since HSP allows you to change the priority, you could change to priority MONITOR, which is higher than HIGHEST, though technically MONITOR priority is not supposed to change the event. In practice, nothing bad happens, but this is a violation of the API contract so it's always possible someday this could cause an issue or Bukkit might actually prevent MONITOR from changing the event.
The last fix is to ask the author of SkyBlock to add in dynamic priorities similar to what HSP has, so that as an admin, you could easily change your config to not be HIGHEST priority. Unfortunately, the Bukkit API does not make this easy at all for plugin authors to do, but I've done it in HSP and HSP is open source so he is welcome to look at the source and copy it for his own use. (assuming that plugin is GPL, if not, he can write me to ask for an exception to use my code in non-GPL plugin).
-
View User Profile
-
Send Message
Posted Dec 10, 2013Hello andune, I have a question. Am totally in love with your plugin, nothing can beat it... but later this day, I was replacing my skyblock plugin with another, and that one totaly sc*ewed the HSP spawn chains... even with the highest priority, this plugin is on top. Now, I know that this isnt your fault, but I was wandering, why is this possible and if there is anything I can do from the side of HSP to fix this. Thx for your answer. ( you may go all technical on me, I know thing or two about java and such :) )
Is it somehow possible that the "bad" plugin hooks into teleport event and overwrites it?
Here is little video with the problem: http://www.twitch.tv/mrinfro/b/486601513
and here is pastebin of my server.log with HSP debug: http://pastebin.com/a9BUTbYi
Thx very much if you can spare a few minutes and look into this. I cant wrap my head around it and I dont want to loose any one of the plugins, but will have to if this cant be solved. But dont worry, I wouldnt get rid of the HSP :D
-
View User Profile
-
Send Message
Posted Dec 9, 2013@Hangar
Over the weekend I set up a test server with the latest dev 1.7.2 CraftBukkit as well as the latest dev builds of plugins like WorldEdit, WorldGuard and CommandBook. Of course I installed the latest HSP Jenkins build #47.
Everything checked out fine for me. I didn't do an extensive test of every HSP option, but I was able to login fine, access and use my homes and excercise a couple of my test event strategies. No issues that I could see.
If you are still having the issue, I would recommend two things. First, setup your own test server with just HSP and some minimal plugins (such a permissions plugin and WorldEdit/WorldGuard) to validate your configuration. If you get an error in this environment, please open a ticket with the stack trace and a list of the versions of CraftBukkit and all plugins and also include your HSP config and what you did to create the error. Since this is a minimal environment that's easily reproducible by me, there's a very high chance I will be able to reproduce and therefore find & fix the issue.
If you're unable to do that, for whatever reason, your second option is to open a ticket with all the same information for your production server, for which I will assume the list of plugins is much larger. The downside is in order for me to reproduce, I have to install all of those plugins and configure/set them up and even then I may not be able to reproduce since I don't have your exact configurations. But you're welcome to upload the info anyway, sometimes something obvious jumps out once all the information is available to me.
-
View User Profile
-
Send Message
Posted Dec 6, 2013@ImminentFire
While there is no direct support for this (ie something like spawnPlayerName where you could set a spawn for the playername), HSP can remember a spawn for each individual player. The intended use case for this was the idea that you have a random spawn and you want to remember where the player spawned so they can return there (instead of some other random spawn).
However, there is no command-based way to manipulate this spawn as an admin. But if you are familiar with SQL or are using a YAML back-end, you certainly could manipulate it there.
Another approach, if you're only expecting to do this for a handful of players, is to assign specific permissions to those players and set per-permission spawns. For example:
Using this setup, you would use your permission system to assign 'player.bob' (which I just made up, you can call it whatever you want) to your player 'bob', and then you would go to wherever you want bob to spawn and run /setspawn bob. Now whenever bob joins, he'll spawn there. You can do the same for onSpawnCommand and onDeath events, or whatever makes sense for what you are trying to do.
One advantage to this method is if you want to setup groups of players to spawn at specific locations (so 3 players all spawn at spawn X), you can easily do that without having to manage a spawn for every single player: you manage the spawn for a permission and then just give out the permission to the players you want to spawn at different places.
-
View User Profile
-
Send Message
Posted Dec 6, 2013Can you set a spawn for a specific player?
-
View User Profile
-
Send Message
Posted Dec 5, 2013@andune
Ok, thanks for the clarification.
-
View User Profile
-
Send Message
Posted Dec 3, 2013Thanks for the quick 1.7 Dev build. One of the reasons I've sworn by this plugin for so long.
-
View User Profile
-
Send Message
Posted Dec 3, 2013@Hangar
On a brief inspection of the stack trace and HSP code to narrow down the problem further, I find a lot in your stack trace that might not be HSP-related, but one that is and is particularly interesting is:
The line of code here is checking the PlayerTeleportEvent "getTo().getWorld()", as well as "getFrom().getWorld()", so one of those calls is returning null. I don't think it's possible for getTo() to be null (teleporting to null doesn't make sense, Bukkit should not let that happen), but it's possible that getFrom() is now null when logging in, which was not the case previously. Previously, as soon as the player logged in, they were given the default spawn location so getFrom() was never null. If that's changed in the latest release of Bukkit, I will have to fix HSP's code to handle the new condition.
However, if this were the issue, you would see this regardless of whether or not you were using WorldGuard or WorldGuard strategies, so this is not consistent with your statement that it worked fine until you used WorldGuard strategies. It's possible WorldGuard (or another plugin) is changing the Teleport events in such a way that getTo()/getFrom() are now null.
In any case, HSP should be coded defensively to protect against this condition without throwing NPEs, it's just surprising that suddenly getTo()/getFrom() are returning null when they never have before. It's all guesswork really until I get a test environment to see the problem in action for myself, so unless this issue solves itself (other plugins or Bukkit fixes), I'll have to do that to do any more research on the issue.
-
View User Profile
-
Send Message
Posted Dec 3, 2013@Hangar
I notice now that you mention you started using spawnRegionRandom when the problem happened, so this makes me happy that at least those not using the WG integrations are probably unaffected. To answer your question, any strategy that depends on the WG integration (such as spawnRegionRandom) won't work if the integration is broken, as it appears to be with the latest WG dev versions.
I'll have to get a test environment up and running and all the latest dev WG code in order to reproduce the issue. In the past, any WG fixes are usually quite obvious and simple, the work is in me getting everything up and running to test with. Until then, don't use WG integration strategies.
If your HSP configuration depends on WG strategies (ie. you can't imagine possibly upgrading without it), then 2 things: 1) Don't upgrade to CB 1.7.2 yet and 2) post here to let me know, if enough people have the issue I'm more likely to try to get to it sooner rather than later.
Quick list of strategies that depend on WG integration: spawnWGregion, spawnRegionRandom, modeInRegion. In addition, the onRegionEnter and onRegionExit events will not work without the WG integration.
-
View User Profile
-
Send Message
Posted Dec 3, 2013@andune
Can you elaborate on what the functionality LOSS is when you don't use the integration with MV (or WG if that's needed)?
Thanks for the reply. I'll keep an eye out for any more updates.
-
View User Profile
-
Send Message
Posted Dec 2, 2013Hmh. All right. Nevermind, I will code it myself.
-
View User Profile
-
Send Message
Posted Dec 2, 2013@draccydragon
Unix file perms are not set and "passed along" when downloading a file from a website such as dev.bukkit.org or Jenkins; the permissions will be set by whatever program you use to download the JAR file. Check your umask. For example, if your umask is set to 077 and you use wget to download the JAR, the local permission on your system after downloading will be 700 and you will have the problem you described.
-
View User Profile
-
Send Message
Posted Dec 2, 2013@pilvimaa
As best I can recall, I don't believe there is any facility for spawning at the "last death location". It's a great suggestion, though and wouldn't be too hard to implement, however I'm not actively adding new features to the plugin. Feel free to open an enhancement ticket and when/if I ever feel so motivated to get back to feature enhancements, at least it'll be on the list.
-
View User Profile
-
Send Message
Posted Dec 2, 2013@Hangar
It looks to be a problem between HSP and WorldGuard - it looks like a new version of WorldGuard was released and since HSP has an integration to allow functionality between the two, that is breaking. I'll have to see what changed in WorldGuard and update HSP.
Sadly, I see I added a core.multiverseEnabled option for disabling the MultiVerse integration, since I considered that the most risky (in terms of possible breakage) integration, but I never added such an option for WorldGuard. So looks like it'll be broken until I fix it (unless it's a WorldGuard issue that needs to be fixed on their side, always that chance).
-
View User Profile
-
Send Message
Posted Dec 2, 2013Any advice on what I should do? I want to spawn the player to the place where he died. I tried using spawnLastLocation but it returns null in the debug messages and doesn't work and players end up in the default spawn.
On Death: - spawnLastLocation
-
View User Profile
-
Send Message
Posted Dec 2, 2013I was going fine until I added a few new strategies for a new world. The onDeath seemed to work fine, but when I logged out, deleted my player.dat, then logged back in to test the onNewPlayer, I got this mess:
http://pastebin.com/x5vAiULx
I did an '/hsp reloadconfig' right before logging out. I see a bunch of other plugins' errors, so I'm not sure if this is your issue or theirs.
The config part:
-
View User Profile
-
Send Message
Posted Dec 2, 2013@andune
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml (and then some read issues) This was caused by the default UNIX permissions on the file (700). You should probably chmod your files to 775 before uploading them if you're in a *nix environment. Changing the file perms on my end fixed it. An explanation: I run my server as a different user than the one I tend to download files with. They share a group, but 700 would lock that out.
-
View User Profile
-
Send Message
Posted Dec 1, 2013@Hangar
Thanks for the heads up. HSP build for CB 1.7.2 just went up on Jenkins a few minutes ago, give it a test and let me know if there are any issues.
-
View User Profile
-
Send Message
Posted Nov 30, 2013FYI, 1.7.7 doesn't seem to work on the first dev builds of CB 1.7.2 (2923). I know you haven't had any time to look at it yet but I just wanted to let you know that I'm ready to help test when you are :)