Why is this question still closed? It's not a duplicate and I've voted to reopen several times. I don't see any argument for why they are duplicates and no one has even provided one either. They are separate questions, one for commands and one for addons.
The question you have linked to is not a duplicate. It clearly wishes to use a different method than the current duplicate target describes.
However, before you click the reopen button, we have to consider that the question may be off-topic for a different reason. You see, game and mod development is off-topic also, so we need to gain a firm stance on whether MCBE add-ons are considered mods. If we do consider them mods, it will end up closed as off-topic anyways, and the guidelines say not to reopen a question just because the close reason is incorrect.
Let's all save our reopen votes until the matter is settled.