Code Monkey home page Code Monkey logo

bequery-java's Introduction

BEQuery-Java - Library Query Minecraft Bedrock Server

Java library that allows to query other minecraft bedrock servers to get information options

Base Code (PHP Language for Pocketmine) >>> https://github.com/jasonw4331/libpmquery

Maven / Dependencies

Required Java 8 or higher to use this library

Repository

<repositories>
  <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
  </repository>
</repositories>

Dependency

<dependency>
    <groupId>com.github.angga7togk</groupId>
    <artifactId>BEQuery-Java</artifactId>
    <version>1.0.1-SNAPSHOT</version>
</dependency>

Recommended

add it to your project's pom.xml, this will build your project and automatically include your .jar / dependencies so no need to bother installing external libraries

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.2.4</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Example

try{
    // host
    // port default = 19132
    // timeout default = 4000
    BEQuery query = BEQuery.connect("localhost", 19132, 4000);

    // information list
    System.out.println(query.getGameName());
    System.out.println(query.getHostName());
    System.out.println(query.getProtocol());
    System.out.println(query.getVersion());
    System.out.println(query.getPlayers());
    System.out.println(query.getMaxPlayers());
    System.out.println(query.getServerId());
    System.out.println(query.getMap());
    System.out.println(query.getGameMode());
    System.out.println(query.getNintendoLimited());
    System.out.println(query.getIpv4Port());
    System.out.println(query.getIpv6Port());
    System.out.println(query.getExtra());
}catch (BEQueryException e){
    e.printStackTrace();
}

bequery-java's People

Contributors

angga7togk avatar

Stargazers

daoge avatar  avatar

Watchers

 avatar

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.