PHP: <?php/*__PocketMine Plugin__name=Instants MINI HOUSEversion=1.0author=Syriamanalclass=Houseapiversion=10*/class House implements Plugin{ private $api, $path; public function __construct(ServerAPI $api, $server = false){ $this->api = $api; } public function init(){ $this->path = $this->api->plugin->configPath($this); $this->config = new Config($this->path."config.yml", CONFIG_YAML, array()); } public function __destruct(){} } private function House($player) { $level = $player->level; $x = $player->entity->x; $y = $player->entity->y; $z = $player->entity->z; $stone = BlockAPI::get(98,0); $glass = BlockAPI::get(20,0); $level->setBlock(new Vector3($x+1, $y, $z, $level), $glass); $level->setBlock(new Vector3($x+1, $y+1, $z, $level), $glass); $level->setBlock(new Vector3($x-1, $y, $z, $level), $glass); $level->setBlock(new Vector3($x-1, $y+1, $z, $level), $glass); $level->setBlock(new Vector3($x, $y, $z+1, $level), $glass); $level->setBlock(new Vector3($x, $y+1, $z+1, $level), $glass); $level->setBlock(new Vector3($x, $y, $z-1, $level), $glass); $level->setBlock(new Vector3($x, $y+1, $z-1, $level), $glass); $level->setBlock(new Vector3($x, $y+2, $z, $level), $glass); $level->setBlock(new Vector3($x, $y-1, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+3, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+1, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+4, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+2, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+5, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+3, $z, $level), $chest); $level->setBlock(new Vector3($x, $y+6, $z, $level), $glass); $level->setBlock(new Vector3($x, $y+3, $z, $level), $glass); $player->teleport(new Vector3($x, $y, $z)); } break; case "House": $this->House($player); $ms = "$target has a MINI House Now!!!"; } } return $ms; } private function overwriteConfig($dat){ $cfg = array(); $cfg = $this->api->plugin->readYAML($this->path . "config.yml"); $result = array_merge($cfg, $dat); $this->api->plugin->writeYAML($this->path."config.yml", $result); } }
Can you please be more specific, you have a whole bunch of stuff that you cut from JudgeTroll that isn't really needed since your plugin doesn't use a YAML.
I took a closer look at the code, there are a ton of errors in the public function house I would recommend really redoing it
If someone did that it would be like writing a brand new plugin. You should just listen to glitchmaster and rewrite it and we can work from there.
No I just need the fixed errors and I will put them in and how did I get error I just used some of the code for the /troll some kid named jf
? Dude delete this plugin and start ALL over almost everything is wrong here. You need to register the command first in init you need to put $issuer and $data almost everything is wrong. And what the heck is $dat? Also your next plugin should be something simple not a Dungeon or mineshaft generator that will take even me months