mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Potion: remove unnecessary exception throw in getPotionEffectsById()
this is only used by Potion and SplashPotion, and simply causes errors when trying to use potions with unknown IDs.
This commit is contained in:
parent
d1a20ecb4a
commit
426dee04a6
@ -72,8 +72,6 @@ class Potion extends Item implements Consumable{
|
||||
*
|
||||
* @param int $id
|
||||
* @return EffectInstance[]
|
||||
*
|
||||
* @throws \InvalidArgumentException if the potion type is unknown
|
||||
*/
|
||||
public static function getPotionEffectsById(int $id) : array{
|
||||
switch($id){
|
||||
@ -213,7 +211,7 @@ class Potion extends Item implements Consumable{
|
||||
];
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException("Unknown potion type $id");
|
||||
return [];
|
||||
}
|
||||
|
||||
public function __construct(int $meta = 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user