error: Code: [13:31:19] [Server thread/CRITICAL]: ArgumentCountError: "Too few arguments to function mines\commands\Mines::__construct(), 1 passed in /home/pe/plugins/mines/src/mines/Main.php on line 81 and exactly 2 expected" (EXCEPTION) in "plugins/mines/src/mines/commands/Mines" at line 21 code PHP: public function __construct(Main $main, Player $player){ parent::__construct("mines", "List of mines", null,[]); $this->main = $main; $this->player = $player; }
fyi, it dont give me error when i remove Player. But the error say "too few arguments", it'll be even more too few if i remove Player $player
You're constructing a new Mines command object with only your main class, while your constructor requires two arguments.
Once again you are posting a few lines of code and hoping people here are going to do the extra work needed to figure out the context... if you provide the full code on github or in code blocks here, you will get more help.