Hello, I am very new to Minecraft and PocketMine-MP. I do enjoy coding and have a decent background in embedded software. I am creating a fun server for my nephew and I to play on but also taking advantage of learning PHP and whatever else I can through this experience. I've gone through most of the tutorials I have found on here and enjoyed them. I want to take things to the next step and change the world I am in. I got an example working, called IAmBack which returns you to the deathlocation. I'd like to place a sign block on that spot now that says RIP $name. I am having a hard time figuring out how to place a block. I have the location I want to place it, and I know that it is a Sign Post, but figuring out the line of code to place the block is confusing me. I have tried $player->getLevel()->setBlock($deathlocation,Block::get(Block::STONE)); (just to try placing a block until I find the Sign Post block). Any help would be great!
I got it to work with the "old" way: $player->getLevel()->setBlock($this->lastdeath[$player->getName()],new SignPost(),false,false); https://forums.pmmp.io/threads/setblock.2214/ mentions not to use "new Stone()" but to use Block::get(Block::STONE) instead and I can not get that to work. Just need to figure out how to add text to it next.
I figured out how to implement the Block::get(Block::BLOCKTYPE) working, I like it since it uses a lot less "use" statements, only need "use pocketmine\block\Block;" to get access to any block.