You should play sounds either only on the server or on both sides. Playing them only on the client will make it so other players cannot hear them. Your sound should definitely not be initiated by the client.
The server is placing many (thousands of) blocks for an ability. I need to remove those blocks after a certain number of ticks. Which would be less resource intensive:
• making those blocks tile entities, with an internal counter, and have them remove themselves when the counter reaches the threshold
• add the block positions to a persistent world capability, with a HashMap of position and number of ticks, and on every server tick (or every 10, or more, to save performance), iterate trough the hashmap, check every counter, and if it has reached the threshold, remove the block at position, else increment the counter. How do I tell if the block at the block position wasn't replaced?
p.s the block in question is dirt. For #1, I would be creating a tile entity with it's texture. Also, the interval does not have to be very accurate (it would be about one minute or so, about 60*20 ticks)
Is there an even better way then the ones above?