Open DANRULEZ123 opened 5 months ago
$event->setBaseDamage(1.0); // or 1 or any int/float
Altay: 1.21.1
PHP:
If you remove all plugins, does the issue still occur?
If the issue is not reproducible without plugins:
public function onDamage(EntityDamageByEntityEvent $event):void{ $damager = $event->getDamager(); $entity = $event->getEntity(); If($event->isCancelled()){ return; } if($damager instanceof Player and $entity instanceof Player){ $event->setBaseDamage(1); // Completely removes attack speed... $damager->sendMessage("Damage Event Triggered."); } }
Issue description
$event->setBaseDamage(1.0); // or 1 or any int/float
completely removes attack speed.Steps to reproduce the issue
OS and versions
Altay: 1.21.1
PHP:
If you remove all plugins, does the issue still occur?
If the issue is not reproducible without plugins:
Crashdump, backtrace or other files
public function onDamage(EntityDamageByEntityEvent $event):void{ $damager = $event->getDamager(); $entity = $event->getEntity(); If($event->isCancelled()){ return; } if($damager instanceof Player and $entity instanceof Player){ $event->setBaseDamage(1); // Completely removes attack speed... $damager->sendMessage("Damage Event Triggered."); } }