PHP: public function onBreakk(BlockBreakEvent $var){$blockid = 1;$itemdrops = 1;if($var->getBlock()->getID() == $blockid){$var->setDrops(array(Item::get($itemdrops)));}}
<?php namespace Drop/dr; use pocketmine\plugin\PluginBase; use pocketmine\event\Listener; use pocketmine\untils\TextFormat; use pocketmine\untils\MainLogger; use pocketmine\block\Block; use pocketmine\item\Item; class Main extends PluginBase implaments Listener{ public function onEnable(){ $this->getServer()->getPluginManager()->registerEvents($this,$this); $this->saveDefaultConfig(); $this->getServer()->getLogger()->info(TextFormat::GREEN."[Plugin] Online"); } public function onBreak(BlockBreakEvent $var){$blockid = 1;$itemdrops = 1; if($var->getBlock()->getID() == $blockid){$var->setDrops(array(Item::get($itemdrops))); } }
1. you just wrote what @Nawaf_Craft1b said. 2. nothing to do with PHP. 3. you learn PHP and stop spamming
Why you said "You learn PHP" if you don't know it? Stop trying to be a "hacker", because you are only a newbie inside this community. I'm not a professional too, but I'm enoughly appropriate to tell you that you are a newbie (noob?) here, you can't try to help if you don't know how to do it... And, please, you literally copied @Nawaf_Craft1b code. -.-
When exactly did he say to learn everything about PHP? I can just learn some simple grammar and say I have learnt PHP.
Why need saveDefaultConfig()? You simply just copy and paste the code without even understand what are you doin'