InfinityGamers / HungerGames-UPDATED

A HungerGames plugin for PocketMine-MP developed by xBeastMode
44 stars 24 forks source link

HungerGame Arenas Does not load correctly. #44

Closed xXSirGamesXx closed 7 years ago

xXSirGamesXx commented 7 years ago

build version 16, MCPE: 1.0.4.11, and For server software I'm using Genisys After I created an arena following the steps that the video does I try joining the arena where the issue occurs. The server will just keep you on one of the slots I created but that's all it does. The game never starts. And /hg leave doesn't work either, just crashes server. That's the issue. I'll get the arena config in a minute.

---
sign_line_1: '&6-=&e[&fS&cG&e]&6=-'
sign_line_2: '&f{on}&f/&a{max}'
sign_line_3: '&aGame: &f{game}'
sign_line_4: '&eStatus: {status}'
is_sky_wars: "no"
min_players: 2
max_players: 12
game_seconds: 2400.000000
waiting_seconds: 10.000000
game_level: hg
refill_chest_after_seconds: 200.000000
chest_items:
- 272 0 1
- 298 0 1
- 299 0 1
- 300 0 1
- 301 0 1
lobby_pos:
  x: 127.000000
  "y": 4.000000
  z: 128.000000
  level: world
death_match_pos:
  x: 140.000000
  "y": 4.000000
  z: 150.000000
  level: world
slots:
  1:
    x: 37.544700
    "y": 148.000000
    z: 86.388200
  2:
    x: 42.535700
    "y": 148.000000
    z: 57.634000
  3:
    x: 37.487200
    "y": 148.000000
    z: 28.362600
  4:
    x: 19.645100
    "y": 148.000000
    z: 7.608700
  5:
    x: -7.732600
    "y": 148.000000
    z: -0.590900
  6:
    x: -34.289400
    "y": 148.000000
    z: 7.477200
  7:
    x: -52.692900
    "y": 148.000000
    z: 28.274100
  9:
    x: -57.671900
    "y": 148.000000
    z: 57.184200
  8:
    x: -52.611100
    "y": 148.000000
    z: 86.409700
  10:
    x: -34.698500
    "y": 148.000000
    z: 107.312800
  11:
    x: -7.374500
    "y": 148.000000
    z: 115.714400
  12:
    x: 19.435700
    "y": 148.000000
    z: 107.585000
sign_list:
  -30:79:-117:spawn: ""
...
xBeastMode commented 7 years ago

Are you testing alone? I know the plugin has bugs with Genisys.

xXSirGamesXx commented 7 years ago

I tried it with pocketmine and got same issue

xXSirGamesXx commented 7 years ago

I'll get the error in a bit

xXSirGamesXx commented 7 years ago

[15:10:13] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'HungerGames vBuild#16': Class hungergames\lib\utils\Loader not found on hungergames\EventListener [15:10:13] [Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

that's the issue I get when I try to join the hunger games

xBeastMode commented 7 years ago

Try this release: https://github.com/InfinityGamers/HungerGames-UPDATED/releases/tag/Build%2316-fixed

xXSirGamesXx commented 7 years ago

doesn't work, similar issue

[17:20:03] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerQuitEvent' to 'HungerGames vBuild#16': Class hungergames\lib\utils\Loader not found on hungergames\EventListener [17:20:03] [Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

xBeastMode commented 7 years ago

Alright. I'm going to have to focus on this plugin cause new bugs keep appearing.

xXSirGamesXx commented 7 years ago

Ok thanks

markkrueg commented 7 years ago

I am experiencing this bug also. Has anyone been able to get this plugin running?

Just to recap; setting up the HG works smoothly until you get to the point of testing the actual game. When a player taps the sign, console says:

[Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'HungerGames vb16a5if': Class hungergames\lib\utils\Loader not found on hungergames\EventListener
[Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

When that player gives up and disconnects, console says:

[Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerQuitEvent' to 'HungerGames vb16a5if': Class hungergames\lib\utils\Loader not found on hungergames\EventListener
[Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144

I'm curious why it thinks the path is hungergames\lib\utils\Loader when the path is really hungergames\Loader; did the path change at some point and something is still configured the old way?

xBeastMode commented 7 years ago

Who knows it might just be a problem in the phar. I know for a fact that it has to do with the Compiler. I'm currently refactoring this plugin to fix this bug and add more features to it.

markkrueg commented 7 years ago

It also exhibits this error when running from source using DevTools.

I have been able to get build #10 working....but it seems a lot more primitive. Also the wrong person seems to win the HG :-)

xBeastMode commented 7 years ago

Yeah, back when I first wrote HG the code was horrible that's why I had to rewrite it but I don't know why the Loader class is in the wrong path.

What I will do is refactor the plugin, doing changes to the paths. I'll try to finish as soon as possible.

markkrueg commented 7 years ago

Thanks for all the work you are putting into this!

While you work on your refactor; I'll keep working on trying to find a temporary workaround for this bug. If you happen to hit on any potential fixes; you can always just post code snippets here and I will test it for you. The non-profit server I help out with has suddenly gotten very excited about Hunger Games :-)

Anyway, thanks again!

xBeastMode commented 7 years ago

Alright, thanks !

markkrueg commented 7 years ago

Here are more details of what happens when a player taps the sign:

[11:31:01] [Server thread/CRITICAL]: Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'HungerGames': Class hungergames\lib\utils\Loader not found on hungergames\EventListener
[11:31:01] [Server thread/CRITICAL]: ClassNotFoundException: "Class hungergames\lib\utils\Loader not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 144
[11:31:01] [Server thread/DEBUG]: #0 (): BaseClassLoader->loadClass(string hungergames\lib\utils\Loader)
[11:31:01] [Server thread/DEBUG]: #1 /HungerGames_45a81d4_source/src/hungergames/lib/utils/Msg(118): spl_autoload_call(string hungergames\lib\utils\Loader)
[11:31:01] [Server thread/DEBUG]: #2 /HungerGames_45a81d4_source/src/hungergames/lib/utils/Msg(36): hungergames\lib\utils\Msg::getConfigMessages(boolean)
[11:31:01] [Server thread/DEBUG]: #3 /HungerGames_45a81d4_source/src/hungergames/lib/utils/Msg(25): hungergames\lib\utils\Msg::initHGMessages(boolean)
[11:31:01] [Server thread/DEBUG]: #4 /HungerGames_45a81d4_source/src/hungergames/lib/mgr/GameManager(321): hungergames\lib\utils\Msg::getHGMessage(string hg.message.join)
[11:31:01] [Server thread/DEBUG]: #5 /HungerGames_45a81d4_source/src/hungergames/EventListener(70): hungergames\lib\mgr\GameManager->addWaitingPlayer(pocketmine\Player Player(1), boolean 1)
[11:31:01] [Server thread/DEBUG]: #6 /src/pocketmine/plugin/MethodEventExecutor(36): hungergames\EventListener->onInteract(pocketmine\event\player\PlayerInteractEvent object)
[11:31:01] [Server thread/DEBUG]: #7 /src/pocketmine/plugin/RegisteredListener(96): pocketmine\plugin\MethodEventExecutor->execute(hungergames\EventListener object, pocketmine\event\player\PlayerInteractEvent object)
[11:31:01] [Server thread/DEBUG]: #8 /src/pocketmine/plugin/PluginManager(675): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\player\PlayerInteractEvent object)
[11:31:01] [Server thread/DEBUG]: #9 /src/pocketmine/level/Level(1662): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\player\PlayerInteractEvent object)
[11:31:01] [Server thread/DEBUG]: #10 /src/pocketmine/Player(2449): pocketmine\level\Level->useItemOn(pocketmine\math\Vector3 Vector3(x=174,y=71,z=290), pocketmine\item\ItemBlock Item Air (0:0)x0, integer 5, double 1, double 0.9463, double 0.4342, pocketmine\Player Player(1))
[11:31:01] [Server thread/DEBUG]: #11 /src/pocketmine/network/mcpe/protocol/UseItemPacket(61): pocketmine\Player->handleUseItem(pocketmine\network\mcpe\protocol\UseItemPacket object)
[11:31:01] [Server thread/DEBUG]: #12 /src/pocketmine/Player(3355): pocketmine\network\mcpe\protocol\UseItemPacket->handle(pocketmine\Player Player(1))
[11:31:01] [Server thread/DEBUG]: #13 /src/pocketmine/network/mcpe/protocol/BatchPacket(74): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\UseItemPacket object)
[11:31:01] [Server thread/DEBUG]: #14 /src/pocketmine/Player(3355): pocketmine\network\mcpe\protocol\BatchPacket->handle(pocketmine\Player Player(1))
[11:31:01] [Server thread/DEBUG]: #15 /src/pocketmine/network/mcpe/RakLibInterface(135): pocketmine\Player->handleDataPacket(pocketmine\network\mcpe\protocol\BatchPacket object)
[11:31:01] [Server thread/DEBUG]: #16 /src/raklib/server/ServerHandler(96): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string 10.10.10.135:19132, raklib\protocol\EncapsulatedPacket `...........0x.c.ebTR...~.................tC.B..N..&:30......, integer 0)
[11:31:01] [Server thread/DEBUG]: #17 /src/pocketmine/network/mcpe/RakLibInterface(76): raklib\server\ServerHandler->handlePacket(boolean)
[11:31:01] [Server thread/DEBUG]: #18 /src/pocketmine/network/Network(170): pocketmine\network\mcpe\RakLibInterface->process(boolean)
[11:31:01] [Server thread/DEBUG]: #19 /src/pocketmine/Server(2376): pocketmine\network\Network->processInterfaces(boolean)
[11:31:01] [Server thread/DEBUG]: #20 /src/pocketmine/Server(2149): pocketmine\Server->tick(boolean)
[11:31:01] [Server thread/DEBUG]: #21 /src/pocketmine/Server(2032): pocketmine\Server->tickProcessor(boolean)
[11:31:01] [Server thread/DEBUG]: #22 /src/pocketmine/Server(1652): pocketmine\Server->start(boolean)
[11:31:01] [Server thread/DEBUG]: #23 /src/pocketmine/PocketMine(493): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string phar:///Applications/PMMP_HG/PocketMine-MP.phar/, string /Applications/PMMP_HG/, string /Applications/PMMP_HG/plugins/)
[11:31:01] [Server thread/DEBUG]: #24 (1): require_once(string phar:///Applications/PMMP_HG/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
xBeastMode commented 7 years ago

Thanks, I actually found the error now and it's something with the Msg class. Can't believe I couldn't see it. This should fix it: https://github.com/InfinityGamers/HungerGames-UPDATED/commit/c2501e6351af24f42988480b4a264bb479611a6a

markkrueg commented 7 years ago

Thank you!!! Much appreciated.

xBeastMode commented 7 years ago

No problem.