2021-06-17 [00:54:15] [Server thread/CRITICAL]: ParseError: "syntax error, unexpected ';'" (EXCEPTION) in "plugins/TradeAPI-stable/src/nlog/trade/listener/TransactionInjector" at line 42 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #0 pmsrc/vendor/pocketmine/classloader/src/BaseClassLoader(124): BaseClassLoader->loadClass(string[39] nlog\trade\listener\TransactionInjector) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #1 (): BaseClassLoader->{closure}(string[39] nlog\trade\listener\TransactionInjector) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #2 plugins/TradeAPI-stable/src/nlog/trade/TradeAPI(80): spl_autoload_call(string[39] nlog\trade\listener\TransactionInjector) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #3 pmsrc/src/pocketmine/plugin/PluginBase(116): nlog\trade\TradeAPI->onEnable() 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #4 pmsrc/src/pocketmine/plugin/PluginManager(552): pocketmine\plugin\PluginBase->setEnabled(boolean 1) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #5 pmsrc/src/pocketmine/Server(1785): pocketmine\plugin\PluginManager->enablePlugin(object nlog\trade\TradeAPI) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #6 pmsrc/src/pocketmine/Server(1771): pocketmine\Server->enablePlugin(object nlog\trade\TradeAPI) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #7 plugins/PocketMine-DevTools.phar/src/DevTools/DevTools(71): pocketmine\Server->enablePlugins(integer 0) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #8 pmsrc/src/pocketmine/plugin/PluginBase(116): DevTools\DevTools->onEnable() 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #9 pmsrc/src/pocketmine/plugin/PluginManager(552): pocketmine\plugin\PluginBase->setEnabled(boolean 1) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #10 pmsrc/src/pocketmine/Server(1785): pocketmine\plugin\PluginManager->enablePlugin(object DevTools\DevTools) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #11 pmsrc/src/pocketmine/Server(1771): pocketmine\Server->enablePlugin(object DevTools\DevTools) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #12 pmsrc/src/pocketmine/Server(1530): pocketmine\Server->enablePlugins(integer 0) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #13 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[72] /storage/emulated/0/Android/data/io.scer.pocketmine/files/PocketMine-MP/, string[80] /storage/emulated/0/Android/data/io.scer.pocketmine/files/PocketMine-MP/plugins/) 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #14 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server() 2021-06-17 [00:54:15] [Server thread/CRITICAL]: #15 pmsrc(11): require(string[127] phar:///storage/emulated/0/Android/data/io.scer.pocketmine/files/PocketMine-MP/P)
1. You are missing some arguments for foreach() 2. You need extra parenthesis (not bracket, thanks minijaham) after getActions() on line 41. Here is the documentation for foreach() https://www.php.net/manual/en/control-structures.foreach.php