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

Mysterycrate crash with particles and world change with Pets #7

Closed
MrBlasyMSK opened this issue Aug 10, 2021 · 4 comments
Closed

Mysterycrate crash with particles and world change with Pets #7

MrBlasyMSK opened this issue Aug 10, 2021 · 4 comments
Labels
bug Something isn't working unconfirmed

Comments

@MrBlasyMSK
Copy link

Describe the bug
If a player tries to teleport to another world and has a pet, the server will internal and restart

To Reproduce
Steps to reproduce the behavior:

  1. Add a pet to yourself
  2. Go to another world
  3. Crash

Expected behavior
That the pets endure the change of world and follow the player

Screenshots
If applicable, add screenshots to help explain your problem.

SimplePets plugin information

  • Version: 1.0.1-beta
  • Server api: I don't know, it's the latest version of pocketmine and I have php 7.4

Additional context

23:52:03] [Server thread/CRITICAL]: TypeError: "Argument 1 passed to pocketmine\Server::pocketmine\{closure}() must be an instance of pocketmine\Player, instance of brokiem\simplepets\pets\CatPet given" (EXCEPTION) in "pmsrc/src/pocketmine/Server" at line 1723
[23:52:03] [Server thread/CRITICAL]: #0 (): pocketmine\Server->pocketmine\{closure}(object brokiem\simplepets\pets\CatPet)
[23:52:03] [Server thread/CRITICAL]: #1 pmsrc/src/pocketmine/Server(1723): array_filter(array[1], object Closure)
[23:52:03] [Server thread/CRITICAL]: #2 pmsrc/src/pocketmine/level/Level(538): pocketmine\Server->batchPackets(array[1], array[1], boolean )
[23:52:03] [Server thread/CRITICAL]: #3 plugins/MysteryCrate.phar/src/JackMD/MysteryCrate/EventListener(239): pocketmine\level\Level->addParticle(object pocketmine\level\particle\FloatingTextParticle, array[1])
[23:52:03] [Server thread/CRITICAL]: #4 pmsrc/src/pocketmine/plugin/MethodEventExecutor(42): JackMD\MysteryCrate\EventListener->onLevelChange(object pocketmine\event\entity\EntityLevelChangeEvent)
[23:52:03] [Server thread/CRITICAL]: #5 pmsrc/src/pocketmine/plugin/RegisteredListener(80): pocketmine\plugin\MethodEventExecutor->execute(object JackMD\MysteryCrate\EventListener, object pocketmine\event\entity\EntityLevelChangeEvent)
[23:52:03] [Server thread/CRITICAL]: #6 pmsrc/src/pocketmine/event/Event(88): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityLevelChangeEvent)
[23:52:03] [Server thread/CRITICAL]: #7 pmsrc/src/pocketmine/entity/Entity(1904): pocketmine\event\Event->call()
[23:52:03] [Server thread/CRITICAL]: #8 pmsrc/src/pocketmine/entity/Entity(1769): pocketmine\entity\Entity->switchLevel(object pocketmine\level\Level)
[23:52:03] [Server thread/CRITICAL]: #9 pmsrc/src/pocketmine/entity/Entity(1794): pocketmine\entity\Entity->setPosition(object pocketmine\level\Position)
[23:52:03] [Server thread/CRITICAL]: #10 pmsrc/src/pocketmine/entity/Entity(1885): pocketmine\entity\Entity->setPositionAndRotation(object pocketmine\level\Position, double 145.8123900474, double -1.5042436028662)
[23:52:03] [Server thread/CRITICAL]: #11 plugins/SimplePets_dev-79.phar/src/brokiem/simplepets/pets/base/BasePet(335): pocketmine\entity\Entity->teleport(object pocketmine\level\Position)
[23:52:03] [Server thread/CRITICAL]: #12 pmsrc/src/pocketmine/entity/Entity(1393): brokiem\simplepets\pets\base\BasePet->entityBaseTick(integer 1)
[23:52:03] [Server thread/CRITICAL]: #13 pmsrc/src/pocketmine/level/Level(854): pocketmine\entity\Entity->onUpdate(integer 18940)
[23:52:03] [Server thread/CRITICAL]: #14 pmsrc/src/pocketmine/level/Level(787): pocketmine\level\Level->actuallyDoTick(integer 18940)
[23:52:03] [Server thread/CRITICAL]: #15 pmsrc/src/pocketmine/Server(2265): pocketmine\level\Level->doTick(integer 18940)
[23:52:03] [Server thread/CRITICAL]: #16 pmsrc/src/pocketmine/Server(2396): pocketmine\Server->checkTickUpdates(integer 18940, double 1628639523.1728)
[23:52:03] [Server thread/CRITICAL]: #17 pmsrc/src/pocketmine/Server(2152): pocketmine\Server->tick()
[23:52:03] [Server thread/CRITICAL]: #18 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
[23:52:03] [Server thread/CRITICAL]: #19 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
[23:52:03] [Server thread/CRITICAL]: #20 pmsrc/src/pocketmine/PocketMine(311): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
[23:52:03] [Server thread/CRITICAL]: #21 pmsrc/src/pocketmine/PocketMine(341): pocketmine\server()
[23:52:03] [Server thread/CRITICAL]: #22 pmsrc(11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
@brokiem brokiem added bug Something isn't working unconfirmed labels Aug 10, 2021
@MrBlasyMSK
Copy link
Author

Apparently it is an error with MysteryCrate, if you remove the plugin it works correctly

I do not know if it can be fixed in any way, close the issue if you think necessary

@brokiem

@MrBlasyMSK
Copy link
Author

It gives an error with the Mysterycrate particle option

showParticle: false

If you have this option like this, it works correctly

@MrBlasyMSK MrBlasyMSK changed the title Internal server error when changing world Mysterycrate bug with particles and world change with Pets Aug 11, 2021
@MrBlasyMSK MrBlasyMSK changed the title Mysterycrate bug with particles and world change with Pets Mysterycrate crash with particles and world change with Pets Aug 11, 2021
@MrBlasyMSK
Copy link
Author

I rectify, I have been tested and it crashes within seconds of moving in another world

@brokiem
Copy link
Owner

brokiem commented Aug 14, 2021

Error occur on this line https://github.com/ifera-mc/MysteryCrate/blob/master/src/JackMD/MysteryCrate/EventListener.php#L239
because the author didn't check the entity instanceof Player and the plugin is archived, please don't use that plugin

@brokiem brokiem closed this as completed Aug 14, 2021
@brokiem brokiem pinned this issue Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants