With the Dutch concentrating once more on Java and the Moluccas in the 18th century , the Bugis took advantage of the vacuum by raiding Perak and Kedah , imposing their chieftains in Selangor and becoming the power behind the throne in Johor .
With the Dutch concentrating on Java , Bugis raided Perak and Kedah becoming the power behind the throne in Johor .