Hello I would like to know how I can make a text that is curtomisable thanks to a config file how I can implement this (I show what I want to customizable) Thanks. PHP: foreach($this->ores as $ore){ if($block->getId() === $ore && !$ev->isCancelled()){ here $ev->setDrops(array()); v v v v v v v$this->getServer()->broadcastMessage("§9[§eBlutoInfo§9] §6$name §9a trouver des diamants !!");$p->getInventory()->addItem(Item::get($this->ingot[$ore]));[PHP] My full code PHP: <?phpnamespace DiamondWarner;use pocketmine\event\block\BlockBreakEvent;use pocketmine\Player;use pocketmine\Server;use pocketmine\plugin\PluginBase;use pocketmine\event\Listener;use pocketmine\level\sound\BatSound;use pocketmine\level\sound\ClickSound;use pocketmine\level\sound\DoorSound;use pocketmine\level\sound\FizzSound;use pocketmine\level\Position;use pocketmine\math\Vector3;use pocketmine\item\Item;use pocketmine\block\Block;use pocketmine\plugin\PluginManager;use pocketmine\Plugin;use pocketmine\Level;class Main extends PluginBase implements Listener{public function onEnable(){$this->getServer()->getLogger()->info("DiamondWarner Loading...");$this->getServer()->getPluginManager()->registerEvents($this,$this); $this->ores=array(56); $this->ingot=array( 56 => 264,);}public function onBreak(BlockBreakEvent $ev){ //variable$player = $ev->getPlayer();$name = $player->getName();//Merci au forum pmmp :)$p = $ev->getPlayer();$block = $ev->getBlock();$item = $ev->getItem()->getId();$ev->setInstaBreak(true);foreach($this->ores as $ore){if($block->getId() === $ore && !$ev->isCancelled()){$ev->setDrops(array());$this->getServer()->broadcastMessage("§9[§eBlutoInfo§9] §6$name §9a trouver des diamants !!");$p->getInventory()->addItem(Item::get($this->ingot[$ore]));}}}}[PHP]
I'd like to add, that instead of posting a thread asking how to do every single thing in your plugin, that you spend time learning the PMMP API first. It would save you and every one else some time. The PMMP Docs are pretty helpful.
The link above is very useful for references and understanding what a particular function or class does, but this thread by Intyre is useful, as well as many of the other threads in the Plugin > Resources section.