PHP: use pocketmine\command\CommandSender;use pocketmine\command\Command;use pocketmine\event\Listener;use pocketmine\scheduler\PluginTask;use pocketmine\plugin\PluginBase;use pocketmine\event\entity\EntityDamageEvent;use pocketmine\plugin\Plugin;use pocketmine\inventory\PlayerInventory;use pocketmine\utils\TextFormat;use pocketmine\event\entity\EntityDamageByEntityEvent;class Main extends PluginBase implements Listener{ public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this, $this); $this->getLogger()->info(TextFormat::AQUA . "Enabled."); } public function onEntityDamage(EntityDamageEvent $event){ $victim = $event->getEntity(); $inv = $victim->getInventory(); $helmet = $inv->getHelmet()->getID(); $chestplate = $inv->getChestplate()->getID(); $leggings = $inv->getLeggings()->getID(); $boots = $inv->getBoots()->getID(); $damage = $event->getDamage(); $cause = $event->getCause(); $this->getLogger()->info("Detected."); $victim->sendMessage("You have been damaged by $cause.");}public function onCommand(CommandSender $sender, Command $command, $label, array $args){ if($command->getName() === "debug"){ $sender->sendMessage("DEBUG"); }} So this is part of the plugin I am working on, but it seems that literally nothing happens, including the console. I just don't understand what could possibly be wrong. The plugin seems loaded correctly in /plugins, but I tried damaging myself, using the registered command /debug, and even adding a message when the plugin is enabled. None of these happened. I just have no idea what could be causing this.
I can tell you: if you have another plugin where plugin.yml uses another plugin's namespace, the other plugin's main will be loaded, (only if the namespace on the another Main is correct)
Is the plugin actually in red color in /plugins? That means that it has been disabled. Enable debug in pocketmine.yml (set debug.level to 2) and read every line of console output.
Namespaces should be the unique identifier for a plugin. Every plugin should have its unique namespace so that its classes won't duplicate with other classes. In Android, apps are actually identified by their packages, and package is the counterpart of namespaces in Java. However, ironically, Android apps don't have the problem of duplicated package names technically because they are run in separate JVMs