mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
Merge pull request #19 from otDan/dev
fix: Correctly handle hurt packet
This commit is contained in:
@@ -104,6 +104,9 @@ public class ModelListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onModelEntityHurt(EntityDamageEvent event) {
|
public void onModelEntityHurt(EntityDamageEvent event) {
|
||||||
|
if (event.isCancelled())
|
||||||
|
return;
|
||||||
|
|
||||||
Map<ActiveModel, ModelEntity> model = ModelEntity.ENTITIES.get(event.getEntity().getEntityId());
|
Map<ActiveModel, ModelEntity> model = ModelEntity.ENTITIES.get(event.getEntity().getEntityId());
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
for (Map.Entry<ActiveModel, ModelEntity> entry : model.entrySet()) {
|
for (Map.Entry<ActiveModel, ModelEntity> entry : model.entrySet()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user