ignore when cancelled

This commit is contained in:
zimzaza4
2024-09-08 19:22:51 +08:00
parent bcae4f2518
commit 4af9209ca3

View File

@@ -86,10 +86,11 @@ public class ModelListener implements Listener {
@EventHandler
@EventHandler(priority = EventPriority.MONITOR)
public void onModelEntityHurt(EntityDamageEvent event) {
if (event.isCancelled())
if (event.isCancelled()) {
return;
}
Map<ActiveModel, ModelEntity> model = ModelEntity.ENTITIES.get(event.getEntity().getEntityId());
if (model != null) {