pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

Player EffectManager() #5770

Closed notacoderr closed 1 year ago

notacoderr commented 1 year ago

Issue description

Steps to reproduce the issue

  1. use $player->getEffects()->add($eInstance); when adding effects, doesn't seem to work when in task.. task = ClosureTask with 21 scheduled ticks

p.s i commented out that line and uses if ($eInstance instanceof EffectInstance) $eInstance->getType()->applyEffect($player, $eInstance);

it works as wanted.

OS and versions

Plugins

Crashdump, backtrace or other files

notacoderr commented 1 year ago

correction: it's $eInstance->getType()->add($player, $eInstance);

github-actions[bot] commented 1 year ago

Hi, we only accept bug reports on this issue tracker, but this issue looks like a support request.

Instead of creating an issue, try the following:

Docs | Discord | Forums