K I am moving over to facepalm as I am a nub and my questions are probably better suited here. I made a plugin to bring in /setblock /fill and /clone commands into pocketmine. They act the same as PE (mostly). Right now what is missing is cloning of special blocks like tranferring sign text, and chest items. So far everything gets cloned just without that extra info. I am working on sign text first. So far I can change text on a sign but it doesnt keep after a server reset. PHP: $tile = $sender->getLevel()->getTile(new Vector3($printX,$printY,$printZ)); $tile->setText("[ Test 1 ]","[ Test 2 ]","[ Test 3 ]","[ Test 4 ]"); That changes the text instantly but gets reset after server restart. I also tried the "killrate" module way of doing it: PHP: private function updateSign($pl,$tile,$text) { $pk = new BlockEntityDataPacket(); $data = $tile->getSpawnCompound(); $data->Text1 = new StringTag("Text1",$text[0]); $data->Text2 = new StringTag("Text2",$text[1]); $data->Text3 = new StringTag("Text3",$text[2]); $data->Text4 = new StringTag("Text4",$text[3]); $nbt = new NBT(NBT::LITTLE_ENDIAN); $nbt->setData($data); $pk->x = $tile->getX(); $pk->y = $tile->getY(); $pk->z = $tile->getZ(); $pk->namedtag = $nbt->write(); $pl->dataPacket($pk); } But the existing text clears and the sign is empty. (visually) So I'm not certain what is happening. any help would be appreciated. This is the pastebin for my module: https://pastebin.com/Kg24mkJ9
I hacked up some code and it seems to clone signs from one spot to another. Chests should basically be the same thing.
Code: --- version: 1.3.0 myStuff: - Test 1 - Test 2 ... using config and the yaml file is named saveditems.yml PHP: $this->config = new Config($this->getDataFolder() . "saveditems.yml", Config::YAML, array()); $blah = $this->config->getAll(); How do I grab test 1 and test 2 vars?