mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 06:25:11 +00:00
Fixed overloaded hurt(damage,entity) function not working when an entity is to be hurt by a player
This commit is contained in:
1 parent
06c730b166
commit
092b3ce0c1
3 files changed
+10
-4
No files matched your search
@@ -233,7 +233,10 @@ public class WrapperNpcAPI extends NpcAPI {
|
||||
}
|
||||
|
||||
public IDamageSource getIDamageSource(IEntity entity) {
|
||||
return new ScriptDamageSource(new EntityDamageSource(entity.getTypeName(),entity.getMCEntity()));
|
||||
if(entity.getType() == 1)//if player
|
||||
return new ScriptDamageSource(new EntityDamageSource("player",entity.getMCEntity()));
|
||||
else
|
||||
return new ScriptDamageSource(new EntityDamageSource(entity.getTypeName(),entity.getMCEntity()));
|
||||
}
|
||||
|
||||
public void executeCommand(IWorld world, String command) {
|
||||
|
||||
Reference in new issue
Block a user