Port is correct, aside from this:
- The previously mentioned function is called when the brick is planted. There is no need to check whether it's planted.
The fxDtsBrick::onPlant function is also called when a temp brick is placed. %brick.isPlanted checks whether the brick is a temp brick or not, so it is in fact something that should be included.