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

Player Citizen can't be killed #874

Closed
quentinlegot opened this issue Aug 3, 2020 · 5 comments
Closed

Player Citizen can't be killed #874

quentinlegot opened this issue Aug 3, 2020 · 5 comments

Comments

@quentinlegot
Copy link

Description

In dungeons, citizens type player can't be killed (other type like enderman or zombie can)
I tried to activate FriendlyFire and PlayerVersusPlayer but nothing change.
Npcs take damage until sword damage are highter than theirs health, then their health don't decrease

I precise we use Sentinel but npc isn't invincible, moreover, there is'nt exception mesage in console

Reproduce

  • Create a npc which is type Player and give it sentinel trait
  • place it on dungeon thank to sign (I use trigger T to spawn every mob)
  • save and play the game
  • Try to kill npc

Expected behavior

Npc which type Player should be killed

Screenshots / GIFs / videos

image

(he can see he have 3.xx hp)

after hitted it three more time(cause it health can regen):
image

Relevant configuration files

initialLives: 1
friendflyFire: true
playerVersusPlayer: true
requirements:
  permission:
    - dungeon2
time: 9000
rain: false
thunder: false
fireTick: false
title:
  title: Goldmine dungeon
keepInventoryOnEnter: true
keepInventoryOnDeath: true
keepInventoryOnFinish: true
keepInventoryOnEscape: false
@Sataniel98
Copy link
Member

Citizens addons may or may not work depending on the way the addon is implemented. If it doesn't use the Trait API, then there is no way to cover copied data abstractly.

@quentinlegot
Copy link
Author

I use sentinel to make npc attack player and sentinel use trait

@Sataniel98
Copy link
Member

Looks like that's a problem with Sentinel in general: mcmonkeyprojects/Sentinel#347

I've tried copying the Sentinel NPC into Citizens' native registry, the same problem that happens with my own one happens. Turns out even teleporting the NPC itself into the instance causes the same problems.

@mcmonkey4eva
Copy link

Whether or not an NPC can be killed is external to Sentinel itself.
Sentinel takes killable NPCs and makes them also fight back, and gives general configuration and control.
Whether they take damage or not is set by a simple vulnerability data value in Citizens.
See also relevant source from Citizens: https://github.com/CitizensDev/CitizensAPI/blob/master/src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java#L400-L403

@Sataniel98
Copy link
Member

Thank you, fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants