PHP code example of lukasss93 / minecraft-tools

1. Go to this page and download the library: Download lukasss93/minecraft-tools library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lukasss93 / minecraft-tools example snippets



	use MinecraftTools\MinecraftTools;
	
	//Show the status of Mojang Services
	print_r( MinecraftTools::serviceStatuses() );
	
	//Get UUID from username
	print_r( MinecraftTools::getUUID('Lukasss93') );
	
	//Get username from UUID
	print_r( MinecraftTools::getUsername('UUID') );
	
	//Get name history from UUID
	print_r( MinecraftTools::getNameHistory('UUID') );
	
	//Add dashes to an UUID
	print_r( MinecraftTools::formatUUID('UUID') );
	
	//Remove dashes from UUID
	print_r( MinecraftTools::minifyUUID('UUID') );
	
	//Check if string is a valid UUID, with or without dashes
	print_r( MinecraftTools::isValidUUID('UUID') );