PHP: function onTree(BlockBreakEvent $e){ $this->getLogger()->info("TEST"); $this->getLogger()->info($e->getBlock()->getName()); if($e->getBlock()->getName()=="log"){ $this->getLogger()->info("TEST"); } } So if I break a block TEST should be sent to the console instead I get nothing: no error, no output, nothing pls help
PHP: function onTree(BlockBreakEvent $e){ $this->getLogger()->info("TEST"); $this->getLogger()->info($e->getBlock()->getName()); if($e->getBlock()->getName() === "log"){ //=== $this->getLogger()->info("TEST"); } }
No not that, I'm talking about this PHP: $this->getServer()->getPluginManager()->registerEvents($this, $this); Did you put that line in your onEnable function?