I am craeting a waiting room and I need a set of iron fence after an amount of time. Would I need to do this with the setBlock
example by blockplacevent $block = $event->getBlock()->getLevel()->getBlock(new Vector3($event->getBlock()->x,$event->getBlock()->y,$event->getBlock()->z)); then u can take the id "->getId()" or something else... and overwrite them with setBlock
So I have the iron fence in the map then it goes and replaced by air? And would I just put that in a public function of the plugin.
if the iron fence is in the map and the code have to find it...uff it will be laaag...but if u want say if player set iron fence its fast
Just use $event->getBlock() instead of making a new Vector3 >.< Just use Block::get(Block::IRON_BAR) >.<
I tried to get the plugin to load but I got something wrong in the namespace of the plugin. What do you mean? And, no offence I don't really like that plugin. Sorry
dont get it to work befor, i think i have to try it again, after some anoying minuites tried this and it runs
PHP: $level = $this->getServer()->getLevelByName("nameoftheworld");$level->setBlock(new Vector3($x, $y, $z), Block::get($id, $metadata)); Try this.