mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Replace InvalidStateException usages with InvalidArgument or LogicException
This commit is contained in:
@ -29,7 +29,7 @@ namespace pocketmine\event\entity;
|
||||
class EntityEffectRemoveEvent extends EntityEffectEvent{
|
||||
public function cancel() : void{
|
||||
if($this->getEffect()->getDuration() <= 0){
|
||||
throw new \InvalidStateException("Removal of expired effects cannot be cancelled");
|
||||
throw new \LogicException("Removal of expired effects cannot be cancelled");
|
||||
}
|
||||
parent::cancel();
|
||||
}
|
||||
|
Reference in New Issue
Block a user