mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added extra Exceptions
This commit is contained in:
@ -90,7 +90,7 @@ class HandlerList{
|
||||
return;
|
||||
}
|
||||
if(isset($this->handlerSlots[$listener->getPriority()][spl_object_hash($listener)])){
|
||||
throw new \Exception("This listener is already registered to priority " . $listener->getPriority());
|
||||
throw new \InvalidStateException("This listener is already registered to priority " . $listener->getPriority());
|
||||
}
|
||||
$this->handlers = null;
|
||||
$this->handlerSlots[$listener->getPriority()][spl_object_hash($listener)] = $listener;
|
||||
|
@ -76,7 +76,7 @@ class EntityDamageEvent extends EntityEvent implements Cancellable{
|
||||
$this->originals = $this->modifiers;
|
||||
|
||||
if(!isset($this->modifiers[self::MODIFIER_BASE])){
|
||||
throw new \Exception("BASE Damage modifier missing");
|
||||
throw new \InvalidArgumentException("BASE Damage modifier missing");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user