Comments (9)
No, it's just that the parameters sometimes named differently between the versions.
-
For C#: parameter
protocol
(https://github.com/FragLand/minestat/blob/master/CSharp/MineStat/MineStat.cs#L160)MineStat ms = new MineStat("minecraft.frag.land", 25565, protocol: SlpProtocol.Bedrock_Raknet);
-
For Go, its the third optional parameter (and the type for bedrock is
REQUEST_BEDROCK
) - though I don't know enough about Go to give you an example 😅. -
For Java (as mentioned above by ldilley): parameter
requestType
(https://github.com/FragLand/minestat/blob/master/Java/me/dilley/MineStat.java#L196)MineStat ms = new MineStat("minecraft.frag.land", 25565, MineStat.Request.BEDROCK);
-
For Javascript its not possible.
-
For PHP: parameter
request_type
(https://github.com/FragLand/minestat/blob/master/PHP/minestat.php#L79)$ms = new MineStat("minecraft.frag.land", 19132, 5, MineStat::REQUEST_BEDROCK);
-
For Perl: parameter no. 4 set to
REQUEST_BEDROCK
$ms = Minecraft::ServerStatus::init("minecraft.frag.land", 25565, Minecraft::ServerStatus::REQUEST_BEDROCK);
-
For PowerShell: parameter
$queryprotocol
(https://github.com/FragLand/minestat/blob/master/PowerShell/MineStat/MineStat.psm1#L126) -
For Python: parameter
query_protocol
(which you can also find in the documentation: https://github.com/FragLand/minestat/tree/master/Python#available-parameters)import minestat ms = minestat.MineStat('minecraft.frag.land', 25565, query_protocol=minestat.SlpProtocols.BEDROCK_RAKNET)
-
For ruby I think you found it yourself (I don't know enough about that language to help you there).
I hope this has cleared up your question 😃!
from minestat.
Dear @molanp, welcome to MineStat :)
In most of the language variants of minestat you can already choose the protocol to use for communication with the Minecraft server. Since Bedrock/MCPE only uses only one specific network protocol, you can simply set that.
How exactly that works depends on which variant of MineStat you are using.
For example in Python you can use the parameter query_protocol
, in the Java variant requestType
and similar in other variants.
For explicitly saying "only Java server" there isn't currently any way that I can think of. If you need that/would like to have that, we can track that as a new feature request.
Best regards,
MindSolve
from minestat.
Bedrock servers are not always BEDROCK_RAKNET
query_protocol, and it may be EXTENDED_LEGACY
(e.g. 2b2t.xin) or something else, and the query_protocol
of Java servers is not always JSON
, and it seems impossible to identify the server type through a limited number of protocols
from minestat.
Oh.Is the slp_protocol
obtained by the query the same as the query_protocol
in the request parameters, and the above are slp_protocol
results
from minestat.
Is there a specific language for which you are observing this behavior, @molanp? I just successfully tested Geyser (listening on TCP 25565 and UDP 25565) using the Java implementation of MineStat. In this case, the default behavior checks for TCP communication first if port 19132 is not specified. If you want the Bedrock server results, simply specify Bedrock as the protocol to use. See examples below.
TCP (legacy, beta, extended, and JSON SLP) is attempted first:
MineStat ms = new MineStat("minecraft.frag.land");
UDP (Bedrock) is used explicitly even while using the default non-Bedrock server port:
MineStat ms = new MineStat("minecraft.frag.land", 25565, MineStat.Request.BEDROCK);
from minestat.
I only see this parameter in Ruby and PHP, it seems that only these two languages are supported?
from minestat.
oh.THANKS!i found it.
from minestat.
No, it's just that the parameters sometimes named differently between the versions.
- For C#: parameter
protocol
(https://github.com/FragLand/minestat/blob/master/CSharp/MineStat/MineStat.cs#L160)MineStat ms = new MineStat("minecraft.frag.land", 25565, protocol: SlpProtocol.Bedrock_Raknet);- For Go, its the third optional parameter (and the type for bedrock is
REQUEST_BEDROCK
) - though I don't know enough about Go to give you an example 😅.- For Java (as mentioned above by ldilley): parameter
requestType
(https://github.com/FragLand/minestat/blob/master/Java/me/dilley/MineStat.java#L196)MineStat ms = new MineStat("minecraft.frag.land", 25565, MineStat.Request.BEDROCK);- For Javascript its not possible.
- For PHP: parameter
request_type
(https://github.com/FragLand/minestat/blob/master/PHP/minestat.php#L79)$ms = new MineStat("minecraft.frag.land", 19132, 5, MineStat::REQUEST_BEDROCK);
- For Perl: parameter no. 4 set to
REQUEST_BEDROCK
$ms = Minecraft::ServerStatus::init("minecraft.frag.land", 25565, Minecraft::ServerStatus::REQUEST_BEDROCK);- For PowerShell: parameter
$queryprotocol
(https://github.com/FragLand/minestat/blob/master/PowerShell/MineStat/MineStat.psm1#L126)- For Python: parameter
query_protocol
(which you can also find in the documentation: https://github.com/FragLand/minestat/tree/master/Python#available-parameters)import minestat ms = minestat.MineStat('minecraft.frag.land', 25565, query_protocol=minestat.SlpProtocols.BEDROCK_RAKNET)- For ruby I think you found it yourself (I don't know enough about that language to help you there).
I hope this has cleared up your question 😃!
It seems that the README.md did not write what options the protocol parameters have
from minestat.
Yeah, that's correct. We are still working on the documentation. Until that's finished, we only have the minimal working example documented (in the readme & most of the time with a example file). For Python it's already documented.
from minestat.
Related Issues (20)
- Add package platform keys/tokens as secrets to automate publishing HOT 3
- Bedrock support broken HOT 7
- Address vulnerabilities in Java dependencies HOT 1
- Expose ConnStatus HOT 4
- Favicon Support HOT 3
- Feature Request - Net Core Support HOT 3
- Minestat Java reports servers as always offline (MC 1.19.2 / Java 17) HOT 12
- [Javascript] minestat.online returns True even after server is shut down HOT 6
- Python bug preventing SLP querying
- KeyError: 'motd_2' , when "-" in the IP HOT 12
- Some servers cannot query the information HOT 10
- Add support for SRV record resolution
- Add GameSpy4/UT3 query protocol support
- JSON Protocol Is Removing Whitespace In MOTD HOT 2
- Is there a Gradle version for java? HOT 2
- Python: Port from SRV record is not used HOT 1
- PHP @ Minestat erroe on socket_recv() line 293 HOT 9
- Powershell -> PHP HOT 3
- Player Username option HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minestat.