Using onPlant will still work, but I'd rather prevent a brick from being planted at all, rather than planting and then quickly removing it - especially using a schedule. I also wanted to use the Plant method for bricks because requiring players to purchase duplicated or loaded bricks would be an interesting concept.
Using SERVERCMDPlantBrick seems like the best options though; so far it works great, doesn't break the ModTer restriction script and doesn't interfere with the new duplicator nor with loaded bricks.
BTW, I'll be releasing updates for Brick Plant Cost and ModTer Interior Build Restriction later today! I'm also hoping to release RPG Bot Tweaks by tonight or tomorrow at the latest.
Does anyone know how to send a specific plant error message to a particular client? I'm changing the packaged function for ModTer Restriction, and wanted to send players the "Buried" message when attempting to build within ModTer while the option is disabled.
::onTrustCheckFinished seems better than ::onPlant, but if you're going to just check the volume on the temp brick when they plant, then I'd just use
serverCmdPlantBrick which is what I agree on with you. I've seen add-ons use
%brick = %group.getObject(0); (I think it was baseplate rules?) and it's a terrible idea, please don't use it if you're thinking about it, lol.
What you could do with the new duplicator is package the force plant function because the temp brick does not exist (and people could bypass it with the duplicator), which is
function NDM_PlantCopy::conditionalPlant(%this, %client, %force), I'd recommend returning the parent when it's successful, otherwise just put a return. The selection is also
%selection = %client.ndSelection; if you need their ghost selection.