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 refocusing on India , Bugis decided to stave off his attack on Perak and Kedah .