Like title, i want to change amount of food will be lost when player sprint using PlayerToggleSprintEvent event. Can anyone give me example ? Thanks
Use PlayerExhaustEvent PHP: /** @var PlayerExhaustEvent $event */if($event->getCause() === PlayerExhaustEvent::CAUSE_SPRINTING){ //$event->setAmount(int);}