Ok So I Am Trying To Give A Player A Effecf On PlayerItemHeldEvent And It Dosent Work Here Is The Code PHP: if($item instanceof Item){ switch($item->getId()){ case 278: $player->addEffect("10"); break; } }
addEffect must be passed with an Effect object. Also, you should never use strings for numbers unless you are playing with the bcadd() family functions (which most of us don't need to use it. I have never used it. It is only for processing extremely large numbers).