Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\Level, null given #173

Closed
r7vmc opened this issue Jul 3, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@r7vmc
Copy link
Contributor

commented Jul 3, 2018

Please make sure your issue complies with these guidelines:

    • Server Software must be the official PMMP w/o vanilla patching plugins (i.e. TeaSpoon)
    • Issue must have not been reported previously
    • Make sure you are on the latest version of PMMP & PiggyCustomEnchants
    • Have a detailed title, like "CustomEnchants::getName() must be..."
    • If possible, provide crashdumps/errors related to the issue.

General

works perfectly but spamming the console

Version:

  • PiggyCustomEnchants: 1.2.0
  • PMMP: 4.0.0+dev.1225 and same error on 3.0.4 too

Steps to Reproduce the Issue

  1. Added Missile Enchants to a bow
  2. Shot a arrow

Extra Information

[Server thread/CRITICAL]: Could not pass event 'pocketmine\event\entity\ProjectileHitBlockEvent' to 'PiggyCustomEnchants v1.2.0': Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\Level, null given, called in C:\Users\USERNAME\Documents\Server\plugins\PiggyCustomEnchants-master\src\PiggyCustomEnchants\EventListener.php on line 991 on PiggyCustomEnchants\EventListener

@DaPigGuy DaPigGuy added the bug label Jul 3, 2018

@r7vmc

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2018

Fixed it by replacing $entity with $damager on Line 991 but now there's another error not fixed

[Server thread/CRITICAL]: Could not tick level "world": Call to a member function broadcastLevelSoundEvent() on null
[14:14:00] [Server thread/CRITICAL]: Error: "Call to a member function broadcastLevelSoundEvent() on null" (EXCEPTION) in "src/pocketmine/entity/projectile/Arrow" at line 130

@r7vmc

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2018

btw this error shows too when using $entity->getLevel()

r7vmc added a commit to r7vmc/PiggyCustomEnchants that referenced this issue Jul 5, 2018

Fixed DaPigGuy#173
closing the entity doesn't return the level nor playing Hit Ground Sound
but Flagging for despawn does it
@r7vmc

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2018

Fixed #174

@DaPigGuy DaPigGuy closed this in ccf0b82 Jul 5, 2018

DaPigGuy added a commit that referenced this issue Jul 5, 2018

Fixed #173 (PR by @r7vmc)
Fixed Argument 2 passed to pocketmine\entity\Entity::createEntity() must be an instance of pocketmine\level\Level, null given

@DaPigGuy DaPigGuy added the fixed/done label Jul 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.