andune / HomeSpawnPlus

Home/Spawn control plugin for Bukkit
GNU General Public License v3.0
13 stars 10 forks source link

nearestHomeOrSpawn strategy does not work with death event. #78

Open Q2Lummox opened 9 years ago

Q2Lummox commented 9 years ago

First sorry for my english.

I'm just doing the tests with 3 plugins

Im use Cauldron 1.7.2-1.1147.04.196 (For the rest I do not have any kind of problem with this plugin or with others.)

I set the events this way:

onHomeCommand:

I created my home both with a bed, as with command /sethome (I've tried both ways) I created two spawn points with /setspawn 1 and /setspawn 2 (type graveyard).

If I stand near of the spawn point 2, I run the command /home, I reappear in the spawn point 2 (as it should, all ok).

The debug, says this:

[17:37:04] [Server thread/INFO]: Q2Lummox issued server command: /home [17:37:04] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onhomecommand player={BukkitPlayer:Q2Lummox} [17:37:04] [Server thread/INFO]: [HomeSpawnPlus](strategy nearestHomeOrSpawn) result is [loc={world,-168,64,267}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl@18acd021}] [17:37:04] [Server thread/INFO]: [HomeSpawnPlus] Evaluation chain complete, result = [loc={world,-168,64,267}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl@18acd021}] [17:37:04] [Server thread/INFO]: [HomeSpawnPlus] result changed to safeLocation, new result = [loc={world,-168,64,267}, home=null, spawn={com.andune.minecraft.hsp.entity.SpawnImpl@18acd021}] [17:37:04] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onteleportobserve player={BukkitPlayer:Q2Lummox}

Well, if I'm near my bed and run the command again /home, reappear in my bed (So far so good). The debug, say this:

[17:49:04] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onhomecommand player={BukkitPlayer:Q2Lummox} [17:49:04] [Server thread/INFO]: [HomeSpawnPlus](strategy nearestHomeOrSpawn) result is [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:49:05] [Server thread/INFO]: [HomeSpawnPlus] Evaluation chain complete, result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:49:05] [Server thread/INFO]: [HomeSpawnPlus] result changed to safeLocation, new result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:49:05] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=onteleportobserve player={BukkitPlayer:Q2Lummox}

So far, so perfect. The home command event, functioning as it should.

The problem is when the event death starts.

If I die near the spawn point 1 or 2, or near my bed, I always reappear in my bed.

When I die near the spawn point 1 to 2, the debug say this: [17:52:37] [Server thread/INFO]: Q2Lummox died [17:52:38] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=ondeath player={BukkitPlayer:Q2Lummox} [17:52:38] [Server thread/INFO]: [HomeSpawnPlus](strategy nearestHomeOrSpawn) result is [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:52:38] [Server thread/INFO]: [HomeSpawnPlus] Evaluation chain complete, result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:52:38] [Server thread/INFO]: [HomeSpawnPlus] result changed to safeLocation, new result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}]

If I die near my bed, says the same.

[17:53:39] [Server thread/INFO]: Q2Lummox died [17:53:41] [Server thread/INFO]: [HomeSpawnPlus] Strategy evaluation started, type=ondeath player={BukkitPlayer:Q2Lummox} [17:53:41] [Server thread/INFO]: [HomeSpawnPlus](strategy nearestHomeOrSpawn) result is [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:53:41] [Server thread/INFO]: [HomeSpawnPlus] Evaluation chain complete, result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}] [17:53:41] [Server thread/INFO]: [HomeSpawnPlus] result changed to safeLocation, new result = [loc={world,-143,64,275}, home={id=2,name=null,playerName=Q2Lummox,world=world,x=-142,04,y=64,z=275,34,yaw=-179,85,pitch=3,bedHome=false,defaultHome=true}, spawn={null}]

It may be that is a problem with the "death" event and the "nearestHomeOrSpawn" strategy?