Hello! I am making a "Snow Wizard" plugin just for fun and to learn. I have a lot of the basics down. I am just a little stumped on how to place a block. My objective is to make a magic-carpet like plugin that does not allow to jump up and walk in air (you stay on the ground) and it puts a SnowLayer over the blocks the player walks on in a 5 block area. I have most of this learned. Besides placing the actual block .-. (yeh I'm a nub) I checked the help docs and this is what is provided: place (Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player=null) Honestly I really do not know how to put this to use. I do believe you need to define the item id with $id = *id* or something of the sorts. This may be posted somewhere, if so then sorry for wasting your time.
It's easy... PHP: $level->setBlock(new Vector3($p->getX(), $p->getY()-1, $p->getZ()), Block::get(/*BlockID*/));
PHP: $level=$this->getServer()->getDefaultLevel(); /*For example*/$p=$event->getPlayer(); /*If you use this in player event*/
Or simply PHP: $Player->getLevel()->setBlock($Player->subtract(0, 1), $Block); $Block can be accessed through Block::get($blockId, $blockDamage) where $blockDamage is 0 if you don't put anything there. Could the level be anything other than the player's current level?
http://www.homeandlearn.co.uk/php/php2p7.html First thing i found about subtract. And yeah no idea what is it