Skip to content
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

[BUG] %player_last_damage% not working #56

Closed
renzwei opened this issue Nov 24, 2018 · 5 comments
Closed

[BUG] %player_last_damage% not working #56

renzwei opened this issue Nov 24, 2018 · 5 comments
Labels
Type: Not a bug This is not a bug caused by PlaceholderAPI Type: Placeholder request Request for new placeholders in an existing or new expansion

Comments

@renzwei
Copy link

renzwei commented Nov 24, 2018

Placeholder %player_last_damage% always return 0.0, No matter how damage you dealt.

@renzwei
Copy link
Author

renzwei commented Nov 24, 2018

Parse:
image

Monster health:
image

@renzwei renzwei changed the title Expansion %player_last_damage% not working [BUG] %player_last_damage% not working Nov 24, 2018
@darbyjack darbyjack added the Problem: Can't Reproduce This issue can't be reproduced to be confirmed label Jan 4, 2019
@iGabyTM
Copy link
Member

iGabyTM commented Jan 6, 2019

@TNG-China, the placeholder %player_last_damage% show the last amount of damage taken.
Image

            case "last_damage":
                return String.valueOf(p.getLastDamage());

@renzwei
Copy link
Author

renzwei commented Jan 18, 2019

@iGabyTM Oh, I see, It's the amount of damage taken, not dealt. But i need dealt amount , Any chance add?

@Andre601 Andre601 added Type: Placeholder request Request for new placeholders in an existing or new expansion Type: Not a bug This is not a bug caused by PlaceholderAPI and removed Problem: Can't Reproduce This issue can't be reproduced to be confirmed labels Feb 8, 2019
@Andre601
Copy link
Collaborator

Andre601 commented Feb 8, 2019

Sorry for the late response.

@iGabyTM Oh, I see, It's the amount of damage taken, not dealt. But i need dealt amount , Any chance add?

This could be possible by checking if the player has done any damage towards an entity.
The question here tho is, if that is doable through an expansion, since as far as I know do we have to listen for an event (PlayerDamageEntityEvent if I remember correctly) which would require us to implement EventListener and such into the expansion.
And there is also no method provided by spigot, to get the last damage dealt towards a entity.

But at the end is this completely up to the dev(s) of the expansion, if they want to implement it or not.
I recommend asking in the Player-expansion repository, if this is possible to add.

@Andre601
Copy link
Collaborator

Andre601 commented Feb 11, 2019

I moved this feature request to the Player-expansion repository
PlaceholderAPI/Player-Expansion#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Not a bug This is not a bug caused by PlaceholderAPI Type: Placeholder request Request for new placeholders in an existing or new expansion
Projects
None yet
Development

No branches or pull requests

4 participants