GameQ icon indicating copy to clipboard operation
GameQ copied to clipboard

Minecraft

Open yaany opened this issue 1 year ago • 3 comments

CS:GO, Minecraft servers is not working. No player count, or online status :(

Fix ? WEB: https://gamebot.lv/ MTA works, cs:go not, mc not

yaany avatar Aug 07 '22 11:08 yaany

Your CSGO server is working on my end using dev-master, make sure you do use the correct port.

Minecraft indeed seems broken. It does seem to not have any streams (?) on the following line with value 0: https://github.com/Austinb/GameQ/blob/97aa7e0579da74c430c7faaae630029979207827/src/GameQ/Query/Native.php#L194

References: https://wiki.unrealadmin.org/UT3_query_protocol https://wiki.vg/Query https://github.com/xPaw/PHP-Minecraft-Query/blob/master/src/MinecraftQuery.php

bumbummen99 avatar Aug 10 '22 18:08 bumbummen99

Just to bump this. If you look at the readme for the xPaw version, which this protocol is based off of, certain items need to be enabled for the query to work. This is also listed in the wiki at https://github.com/Austinb/GameQ/wiki/Supported-servers-list-v3

Minecraft (Gamespy v3) - Requires Minecraft 1.8+ Reference. Requires server settings: enable-query=true & query.port=25565

Is this enabled on the Minecraft server in question?

Austinb avatar Aug 21 '22 15:08 Austinb

Just to bump this. If you look at the readme for the xPaw version, which this protocol is based off of, certain items need to be enabled for the query to work. This is also listed in the wiki at https://github.com/Austinb/GameQ/wiki/Supported-servers-list-v3

Minecraft (Gamespy v3) - Requires Minecraft 1.8+ Reference. Requires server settings: enable-query=true & query.port=25565

Is this enabled on the Minecraft server in question?

Tested it on mine, the public Nitrado and the Hypixel one - all broke. Hypixel should be properly configured since it does work with the xPaw package (https://skycraft.skyraptor.eu/).

Also checked the inital message against the xPaw version but it is the same so it should work

bumbummen99 avatar Aug 21 '22 16:08 bumbummen99

Minecraft java version works without problems Here are two examples: Minecraft Vanilla and Modded Minecraft

Screenshot_20220823-012130_Chrome.jpg Screenshot_20220823-011953_Chrome.jpg

CS:GO also works without problems.

Erani0 avatar Aug 22 '22 23:08 Erani0

Minecraft java version works without problems Here are two examples: Minecraft Vanilla and Modded Minecraft CS:GO also works without problems.

Wanna share the cfg for these servers? Also what version of GameQ are you on (composer show Austinb\GameQ)?

bumbummen99 avatar Aug 23 '22 09:08 bumbummen99

I use the normal version that you can download. I don't have a special version

Erani0 avatar Aug 23 '22 09:08 Erani0

@yaany To read the status of your Minecraft server you have to enable enable-query=true in your gameconfig otherwise it won't work you can also see this here https://mcsrvstat.us/server/mc.side.lv and before you ask the readout on the website does not work with GameQ

Here a Simple PHP script to test

<?php
require_once('GameQ/Autoloader.php');
//Please adjust path to Autoloader.php

$servers = [
    [
        'type'    => 'minecraft',
        'host'    => '141.95.59.103:25565',
    ],
    [
        'type'    => 'csgo',
        'host'    => '216.52.148.47:27015',
    ]
            
];

$GameQ = \GameQ\GameQ::factory();
$GameQ->addServers($servers);
$GameQ->setOption('timeout', 5);
$results = $GameQ->process();

$GQ = json_encode($results);

$arr = json_decode($GQ, true);
 
foreach($arr as $key=>$value){
    echo $key . "=><br>" . json_encode($value) . "<br><br>";
}
echo "<br>";

?>

Erani0 avatar Aug 23 '22 11:08 Erani0

$results = $GameQ->process();

Does not work for me with current v3 branch either locally or from GitHub Actions https://github.com/Austinb/GameQ/pull/649/checks

Can you please tell us what version is in the composer.json file inside the GameQ directory? Also please include the PHP Version, you can get it with the command php -v. Also how did you obtain GameQ? Did you download it using composer or just directly from github?

bumbummen99 avatar Aug 23 '22 19:08 bumbummen99

I downloaded it directly from github and my php version is 8.1.9 and @bumbummen99 please check your email i have write you

Erani0 avatar Aug 23 '22 20:08 Erani0

Also make sure query.port is set to the port you use in your config. Turns out tested servers had this set differenly, once adjusted it does work as intended.

bumbummen99 avatar Aug 28 '22 11:08 bumbummen99