in 1314. Nevertheless, John later would support Louis IV in his rivalry with Frederick the Fair, King of Germany, culminating in the 1322 Battle of Mühldorf in which in return he thus received the Czech region of Egerland as a reward. Problems with nobility Like his predecessor Henry, he was disliked by much of the Czech nobility. John was considered to be an "alien king" and gave up the administration of Bohemia after a while and embarked on a life of travel. He parted ways with his wife and left the Czech country to be ruled by the barons while spending time in Luxembourg and the French court. John's travels took him to Silesia, Poland, Lithuania, Tyrol, Northern Italy and Papal Avignon. A rival of King Władysław I the Elbow-high to the Polish crown, John supported the Teutonic Knights in the Polish–Teutonic War from 1326 to 1332. He also made several Silesian dukes swear an oath of allegiance to him. In 1335 in Congress of Visegrád, Władysław's successor King Casimir III the Great of Poland paid a significant amount of money in exchange for John's giving up his claim to the Polish throne. John's first steps as king was the re-establishment of authority and to secure peace within the country. In 1311 he was able to reach an agreement with the Bohemian and Moravian aristocracy which is referred to as the "inaugural diplomas" with which John restricted the relations of both the ruler and aristocracy. The aristocracy was however allowed to hold the right to elect the king, to decide the matter of extraordinary taxation, the right to their property, and the right to choose freely whether or not to offer military support to the king in foreign wars. Although the aristocracy was encouraged to raise armies when peace within the country was threatened. On the other hand, the king's right to appoint a foreign official to office was abolished. John structured these agreements to provide a basis for the consolidation of the ruler's power within the Bohemian kingdom. The agreements weren't as successful as John intended. The aristocracy did not intend on surrendering its property and the influence it gained after Wenceslas II died. The growing tensions within the aristocracy along with the lack of communication due to John's consistent absence in Bohemia led to a competition of two factions of the Czech nobility. One party, led by Jindřich