Well first off I will say centipedes are harmless to the plant they eat bugs and depending on the type they could be biters... Millipedes eat the roots and kill the plant.. Also majestic palms really aren't the best at being house plants.
Ok with that being said

changing the soil and if they are millipedes trimming root rot from the eating is usually the best bet from my experience.