Giter VIP home page Giter VIP logo

minecraft-status-query's People

Contributors

rmmccann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minecraft-status-query's Issues

Also yields "Socket Timeout! Is the server offline?"

Whenever I try to run this at all, It always gives me a "Socket Timeout! Is the server offline?" regardless of the IP address and port entered in.
Full error: Socket Timeout! Is the server offline? Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "bytes" is null at java.base/java.lang.String.<init>(String.java:632) at query.MCQuery.handshake(MCQuery.java:45) at query.MCQuery.basicStat(MCQuery.java:54) at mainStuff.testerewr.main(yepThisIsABucket.java:8)

Query bug when motd is tweaked

There is a bug in this API if you start the Minecraft server with

motd=\u00A7e<\u0000

In the QueryResponse.java there is
motd = new String(temp[3]);

but when you put this strange motd the temp[4] is empty and then all others variable attribution are wrong.

To produce the bug just put motd=\u00A7e<\u0000 in your server.properties file and start the server. Then try to get the full Query info.

"Socket Timeout! Is the server offline?" when I try to connect 1.16.5 server

code

package com.themixray;

import java.util.logging.Logger;

public class Main {

    public static void main(String[] args) {
        Logger log = Logger.getLogger("LOG");
        long st = System.currentTimeMillis();
        MCQuery mcQuery = new MCQuery("0.tcp.ngrok.io", 12601);
        QueryResponse response = mcQuery.basicStat();
        float ping = (float)System.currentTimeMillis()-st;
        log.info("ping "+Float.toString(ping));
    }
}

project tree
tree

Error on query

I get a NullPointerExeption with this "token = Integer.parseInt(new String(result).trim());" on line 45 in class MCQuery.

Single quotes in JSON

If there is a single quote in a JSON string, it won't parse properly. This occurs sometimes when there is a single quote in a server motd string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.