synchronized to make plugin accept commands one by one