-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server spawn #69
Comments
Interesting. Thank you for using verboseLogging and including the output - we can see that HSP is indeed detecting you as a new player and sending you to your firstSpawn location on world lobby. So what is most likely happening is that some other plugin is then overriding HSP and sending you somewhere else. HSP has detection code for this possibility on respawn events and will print a warning message if it sees another plugin moving the player elsewhere, and I thought it had it onJoin as well, but I just checked the code and don't see it. In any case, all that would tell us is that some other plugin (unknown) is teleporting the player away, which we already know from the messages you are seeing. I built a plugin called SwissArmyKnife to allow you to view Bukkit event chains to make finding issues like this easier, but BukkitDev disabled it as inactive and it got lost on Jenkins when I upgraded. I'll see about getting it built on Jenkins so you can do more troubleshooting, but in the mean time the easiest thing is to disable other plugins one at a time until the behavior goes away. Then you know which plugin is overriding HSP and can work to fix it. |
Alright I have SwissArmyKnife uploaded to Jenkins now. It has a few commands, one is '/eld' which will show you all event listeners (best to use from console, it's very verbose). For your purposes, however, the command you are interested in is '/ev' which will dump all event listeners for a given event. It does a regex match, so '/ev Join' will match "PlayerJoinEvent" and show you all plugins listening to that event. Here's sample output from my test server:
They are sorted in order from lowest->highest and you can see, with the exception of Vault listening at MONITOR priority, HSP is the highest and so should have final say. However, there is one caveat with PlayerJoinEvent in particular - Bukkit has no API for setting the teleport destination, as it does with other events. So every plugin that offers control over login location does so by adding a scheduled event to run a few tics after player login and then doing the teleport. In this case, the plugin which has the longest tick delay wins. For example, if HSP does this teleport after 2 tics (it does), but MultiVerse does it after, say, 5 tics, then multiverse would "win". There is no way to see this with SwissArmyKnife, but at least you'll know the plugins listening to PlayerJoinEvent that could be considered possible culprits. Additionally, it turns out I was wrong: HSP DOES have detection code for onJoin, you'll see a warning of the format: "log.info("onJoin: final player location is different than where "+plugin.getName()+" sent player, another plugin has changed the location." However, this warning is scheduled to fire after 5 tics of HSP's teleport, so if the offending plugin is waiting a full second (20 tics), HSP's warning won't see it to alert you. |
Hi thank you for posting so quickly I am really sorry but yesterday after posting this, I was for one hour trying many setup and this morning IT WORKS. Big surprise ! The main thing changed I guess is in homespawnplus config : The default/main world. Strategies reference this as the default world, you can change that here if you like.defaultWorld: lobby I dont know if it will make problems that I changed this from world to lobby I installed SwissArmyKnife but I see the output only in game not in logs. My console is buggy on my provider site so I cant launch from it. Essentials VTeamcity has HIGHEST Priority and Homespawnplus LOWEST (may be I changed it yesterday) [06:28:17] [Server thread/INFO]: [HomeSpawnPlus] New player Alzou detected. TEST NEW TEST I changed the HomeSpawnPlus config : The default/main world. Strategies reference this as the default world, you can change that here if you like.defaultWorld: world AND NOW IT DOESNT WORK !! I SPAWN IN THE WILD So.... I have to set defaultWorld = lobby to spawn again first joiners in lobby Am I going to deal with problems with this setup ? But I am happy it works Thanks for your awesome plugin !! |
Ok It doesnt work. My players cant use /home anymore :( Help please |
Zip/tar up your config directory and upload it somewhere that I can download. Then describe (in words) what it is you are trying to accomplish: new players spawn (here), when players type /home, XYZ happens, etc. I will take a look at your configs and to help you make sure it is doing what you intend. |
Login to your server and go to the place on world WELCOME where you want new player to spawn and run "/setfirstspawn". At this point, you should be able to move away and type "/spawn newPlayerSpawn" and you will be taken to the spawn you just set. Once this is completed and verified, your current event chain for "onJoin" which includes "spawnNewPlayer" as the first strategy, should work regardless of the defaultWorld setting. If it's not working, you most likely have a plugin conflict. A simple way to test/confirm a plugin conflict is to change onJoin to something like so:
Then go "/setspawn foo" somewhere. Now every time you, or anyone else logs in, you will be sent to that spawn point. If this works, then you have a working HSP installation without plugin conflicts and getting everything else you want working should be pretty easy. If this doesn't work as you expect, then you have some other plugin controlling login behavior and you need to get that under control first. |
Hello
Ive a server with a Lobby and a world
Plugins :
PopulationDensity
Multiverse
Worldguard
Homespawnplus.
I would like the first joiners spawn at lobby but whatever I do they always spawn at the main world spawn.
I ve setup
In multiverse config :
firstspawnoverride: 'true'
firstspawnworld: Lobby
In homespawn plus
defaultWorld: world
override_world: false
I deleted player data for my char "Alzou" and relogged ( I was at lobby) and I spawn in the wild on the main world.
Help please
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] New player Alzou detected.
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] Attempting to respawn player Alzou (joining).
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onnewplayer player={BukkitPlayer:Alzou}
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onjoin player={BukkitPlayer:Alzou}
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus](strategy spawnNewPlayer) player is detemined to be a new player
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus](strategy spawnNewPlayer) result is [loc={lobby,-125,18,-51}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl$$EntityBean$HomeSpawnPlus@43eb39b1}]
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] Evaluation chain complete, result = [loc={lobby,-125,18,-51}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl$$EntityBean$HomeSpawnPlus@43eb39b1}]
[19:14:49] [Server thread/INFO]: [HomeSpawnPlus] result changed to safeLocation, new result = [loc={lobby,-125,18,-51}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl$$EntityBean$HomeSpawnPlus@43eb39b1}]
The text was updated successfully, but these errors were encountered: