PHP code example of loper / minecraft-query-client

1. Go to this page and download the library: Download loper/minecraft-query-client 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/ */

    

loper / minecraft-query-client example snippets


#!/usr/bin/env php


declare(strict_types=1);

use Loper\Minecraft\Protocol\Struct\JavaProtocolVersion;
use Loper\MinecraftQueryClient\MinecraftQuery;

rotocolVersion::JAVA_1_7_1
    ));
};

#!/usr/bin/env php


declare(strict_types=1);

use Loper\Minecraft\Protocol\Struct\JavaProtocolVersion;
use Loper\MinecraftQueryClient\MinecraftQuery;

ProtocolVersion::JAVA_1_7_1
    ));
};

#!/usr/bin/env php


declare(strict_types=1);

use Loper\Minecraft\Protocol\Struct\JavaProtocolVersion;
use Loper\MinecraftQueryClient\MinecraftQuery;

JavaProtocolVersion::JAVA_1_7_1
    ));
};

#!/usr/bin/env php


declare(strict_types=1);

use Loper\Minecraft\Protocol\Struct\BedrockProtocolVersion;
use Loper\MinecraftQueryClient\MinecraftQuery;

tocol: BedrockProtocolVersion::BEDROCK_1_20_15
    ));
};