MobHunting

MobHunting

114k Downloads

Player skull not dropping during PvP

vilgrar opened this issue ยท 13 comments

commented

Hi,

Another strange problem. Skulls drop during pvp battle but they are not of the player.

I'm using:
pvp-kill-cmd: mobhunt head give {player} 397 1 3 {SkullOwner:"{killed_player}"} 1 silent

When dropped, message says: "You got a head of a 1". The head is a default human head.

I tried replacing the placeholders:
/mobhunt head give vilgrar 397 1 3 {SkullOwner:"{sebbe009}"} 1 silent

Same result.

commented

You are missing the 's

mobhunt head give {player} 397 1 3 {SkullOwner:"{killed_player}"} 1 silent

" must be escaped....

commented

Apart from the diamond reward which I removed today), I haven't touched that line before.

My test server with a fresh install contains the very same line. Please show me the correct syntax, I'm unsure what you mean.

commented

Forget the escaping it's not that. I'll look at it tomorrow.

commented

I think the display name is missing

Try mobhunt head give {player} 397 1 3 {SkullOwner:"{killed_player}"} {killed_player} 1 silent

I should never have added the display name .., its confusiob

commented

No difference =(
The syntax makes sense, but it's still called 1's Head and a default human skull. I tried both the placeholder and manual command.

commented

I just realize we are completely wrong. Also in my source code

Mobhunt head give {player} {killed_player}

Will work

SkullOwner is from long ago when I used the minecraft give command to produce the head

commented

Build 408+

commented

PLease test newest build, and delete the line "pvp-kill-cmd" in config.yml before your start the server.

PS. I removed the diamond in the code too....

commented

Yeah, that's a tricky one. It's a safer bet in the long run to add a red, visible warning on the console, and a special note when you release next version. Someone may post this issue in the future, but that sounds better than you straying from your way of coding and possibly forget about it in the future when new issues arise.

commented

Okay, I will add a warning tonight - after work. :-)

commented

Mobhunt head give {player} {killed_player}

Works! I can't believe no one reported this bug yet.

commented

The thing is that I cant just change this setting in the config.yml... Because I (normally) never change the values in the config.yml.

In this case I think I will add a warning in the server log, if the pvp-kill-cmd contains SkullOwner, because then I know something is wrong. Or maybe I should change the value in this case?

commented

A warning is now added IF both "mobhunt" and "skullowner" is present in pvp-kill-cmd

18:27:05 INFO: Potential error in your config.yml. pvp-kill-cmd contains SkullOwner,
18:27:05 INFO: which indicates that pvp-kill-cmd is outdated. Check the head command
18:27:05 INFO: or delete the line pvp-kill-cmd, and then reload the plugin. The
18:27:05 INFO: correct syntax to get a player head is:
18:27:05 INFO: "mobhunt head give {player} {killed_player} {killed_player} 1 silent"
18:27:05 INFO: [Mobhunting]=========================================================