Temenggung of Johor. The Johor Sultanate was the successor of the Malacca Sultanate, both of which had their own codes of law. It is also possible that adat law, often inadequately translated as "customary law", governed the inhabitants of the island prior to its acquisition by the British. However, little, if anything, is known about the laws that were actually applicable. The British have always assumed that no law prevailed on the island of Singapore when it was acquired. In 1823 Raffles promulgated "Regulations" for the administration of the island. Regulation III of 20 January 1823 established a magistracy which had jurisdiction over "all descriptions of persons resorting under the British flag". The magistrates were enjoined to "follow the course of the British magistracy, as far as local circumstances permit, avoiding technicalities and unnecessary forms as much as possible, and executing the duties of their office with temper and discretion, according to the best of their judgement and conscience and the principles of substantial justice". Raffles' Regulations were most likely illegal as he was acting beyond the scope of his legal powers in making them – although he had power to place the factory at Singapore under the jurisdiction of Bencoolen, he was not vested with power to place the entire island under Bencoolen's control. In this respect, he had treated Singapore as if the entire island had been ceded to the British when the Treaty with the Sultan and the Temenggung had only permitted the establishment of a trading factory. The same year, Raffles appointed John Crawfurd as Resident of Singapore. Crawfurd doubted the legitimacy of the judicial system set up by Raffles, and annulled proceedings in which magistrates had ordered the flogging of gamblers and the seizure of their properties. He eventually abolished the magistracy, replacing it with a Court of Requests overseen by an Assistant Resident which dealt with minor civil cases, and a Resident's Court hearing all other cases which he himself presided over. Crawfurd had no authoritative guide to the applicable law, so he decided cases on "general principles of English law", taking into account so far as he could the "character and manners of the different classes" of local inhabitants. Unfortunately, Crawfurd's courts also lacked legal foundation, and he had no legal powers over Europeans in Singapore. Serious cases involving British subjects had to be referred to Calcutta; otherwise, all he could do was