Pls help import to 1.5 Its code for 1.3 class Main extends PluginBase implements Listener { public function tntcheck($data){ $check = $this->config->get('TNTRun'); $block = $data->level->getBlock(new Vector3($data->x, ($data->y -1), $data->z)); if ($check == true){ if($block->getID() == 46){ $data->level->setBlock(new Vector3($data->x, $data->y-1, $data->z,$data->level), new AirBlock()); }} else{} } public function __destruct(){ } }
I formatted the code in the quote to let others read more easily. So, in the formatted code: It is a better practice to use === rather than == on lines 06 and 08. `$a == true` can be replaced by `$a`. If this is all of your code, it does nothing because it isn't connected with the PocketMine API at all and PocketMine will not do anything for you. Line 13 is redundant and can be deleted. Line 16-17, an empty __destruct() is not necessary.