Hi there, I did a simple plugin by watching tutorials. I installed DevTools plugin into my server. I know I need to type /makeplugin {pluginname} After I typed /makeplugin Welcome,it shows an error message "Invalid plugin name,check the name case in the console." However, doesn't my plugin named Welcome??.. Thanks.
Your plugin is a mess. Main.php should be in the src/bluewhaleyt folder. And in the plugin.yml you need to put a : after the command text
Code: commands: text: description: "Stop sending screenshots and just paste the fucking text" cure: description: "It's a pain in the ass to read and copy"
ParseError: "syntax error, unexpected 'public' (T_PUBLIC), expecting '{'" (EXCEPTION) in "plugins/Welcome/src/BlueWhaleYT/Main" at line 13 [14:23:13] [Server thread/DEBUG]: #0 (): BaseClassLoader->loadClass(string[16] BlueWhaleYT\Main) [14:23:13] [Server thread/DEBUG]: #1 (): spl_autoload_call(string[16] BlueWhaleYT\Main) [14:23:13] [Server thread/DEBUG]: #2 src/pocketmine/plugin/PluginManager(180): class_exists(string[16] BlueWhaleYT\Main, boolean 1) [14:23:13] [Server thread/DEBUG]: #3 src/pocketmine/plugin/PluginManager(351): pocketmine\plugin\PluginManager->loadPlugin(string[49] /storage/emulated/0/PocketMine-MP/plugins/Welcome, array[1]) [14:23:13] [Server thread/DEBUG]: #4 plugins/PocketMine-DevTools (1).phar/src/DevTools/DevTools(71): pocketmine\plugin\PluginManager->loadPlugins(string[42] /storage/emulated/0/PocketMine-MP/plugins/, array[1]) [14:23:13] [Server thread/DEBUG]: #5 src/pocketmine/plugin/PluginBase(123): DevTools\DevTools->onEnable() [14:23:13] [Server thread/DEBUG]: #6 src/pocketmine/plugin/PluginManager(580): pocketmine\plugin\PluginBase->setEnabled(boolean 1) [14:23:13] [Server thread/DEBUG]: #7 src/pocketmine/Server(2008): pocketmine\plugin\PluginManager->enablePlugin(object DevTools\DevTools) [14:23:13] [Server thread/DEBUG]: #8 src/pocketmine/Server(1994): pocketmine\Server->enablePlugin(object DevTools\DevTools) [14:23:13] [Server thread/DEBUG]: #9 src/pocketmine/Server(2077): pocketmine\Server->enablePlugins(integer 0) [14:23:13] [Server thread/DEBUG]: #10 src/pocketmine/command/defaults/ReloadCommand(49): pocketmine\Server->reload() [14:23:13] [Server thread/DEBUG]: #11 src/pocketmine/command/SimpleCommandMap(270): pocketmine\command\defaults\ReloadCommand->execute(object pocketmine\command\ConsoleCommandSender, string[6] reload, array[0]) [14:23:13] [Server thread/DEBUG]: #12 src/pocketmine/Server(2035): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[6] reload) [14:23:13] [Server thread/DEBUG]: #13 src/pocketmine/Server(1622): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[6] reload) [14:23:13] [Server thread/DEBUG]: #14 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}() [14:23:13] [Server thread/DEBUG]: #15 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications() [14:23:13] [Server thread/DEBUG]: #16 src/pocketmine/Server(2355): pocketmine\snooze\SleeperHandler->sleepUntil(double 1575728592.8462) [14:23:13] [Server thread/DEBUG]: #17 src/pocketmine/Server(2212): pocketmine\Server->tickProcessor() [14:23:13] [Server thread/DEBUG]: #18 src/pocketmine/Server(1790): pocketmine\Server->start() [14:23:13] [Server thread/DEBUG]: #19 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[34] /storage/emulated/0/PocketMine-MP/, string[42] /storage/emulated/0/PocketMine-MP/plugins/) [14:23:13] [Server thread/DEBUG]: #20 src/pocketmine/PocketMine(299): pocketmine\server() [14:23:13] [Server thread/DEBUG]: #21 (1): require(string[89] phar:///storage/emulated/0/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/Pocke) then devtools closed.
There's a syntax error in your main file, check for missing semicolons (;) and curly braces ({ and })
In plugin.yml change Code: main: BlueWhaleYT\Main to Code: main: BlueWhaleYT\Welcome\Main Change your folder structure so that "src/BlueWhaleYT" contains a folder called "Welcome" in which your main.php goes. Change the namespace in Main.php from "namespace Welcome;" to "namespace BlueWhaleYT\Welcome;"
Move Main.php from "src/BlueWhaleYT" to "src/BlueWhaleYT/Welcome", that way your plugin has the namespace "BlueWhaleYT\Welcome" and not just "BlueWhaleYT". This is the recommended practise by PQRS, rule C1a: https://poggit.pmmp.io/rules.edit
the problem is Welcome Folder is includes src,BlueWhaleYT,main.php and plugin.yml,isn't it? how I drag it there.
are the src/BlueWhaleYT/Welcome is created by yourself ?That's mean I need to create a empty folder named Welcome?