Ghost bricks and normal bricks share the same class, means all your packaged functions are run every time something is done to a brick in the server. That's really inefficient, you only care about ghost bricks.
Some thoughts to make the code much better:
- Don't package onAdd, package BrickDeployProjectile::onCollision instead and check whether player.tempBrick has been set to a brick.
- Ghost bricks can't be fake killed. Remove package onFakeDeath and onClearFakeDeath because it's totally pointless.
- Don't package onColorChange, instead package the servercmds for changing paint colors and check if a temp brick exists.
- onRemove is always called after onDeath when the brick is actually deleted. I'm not actually sure whether onDeath is called at all for ghost bricks... either way, the package on onDeath is pointless.