mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
Effect: Better fix for duration bug seen in 3614711a027c55df1723eefae36b4a79397e6e95
This commit is contained in:
parent
7f0d0c9d63
commit
8d08840ea4
@ -544,7 +544,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
if($effect->canTick()){
|
||||
$effect->applyEffect($this);
|
||||
}
|
||||
$effect->setDuration($effect->getDuration() - $tickDiff);
|
||||
$effect->setDuration(max(0, $effect->getDuration() - $tickDiff));
|
||||
if($effect->getDuration() <= 0){
|
||||
$this->removeEffect($effect->getId());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user