8/27/2023 0 Comments Minecraft server status api![]() ![]() We will pass these to the API that will return back the information about the server. We are going to create a function that will accept the severIp, and serverPort as parameters. In simplest terms, Minecraft API is an API that provides the ability to interact with Minecraft servers. This service has greatly improved reliability over this library, and. It has been deprecated in favor of my other service, mcstatus.io, which is an online API for retrieving the status of any Minecraft server. Just navigate over to it, Coding Tutorial Starter HTML This library will be deprecated in the near future, meaning that it will no longer be actively maintained or support any future updates. The starter files can be found in the following github repository. Please feel free to leave feedback if you are interested in how to create this screen. I wanted to keep the tutorial short in order to show how easy it us to plug this stuff in to your existing application. In the starter code in the video, I use a HTML + CSS page that I made off camera. I will be using this as a guide to reference code instead of writing it fully in the video. Video Tutorialįeel free to follow along with the video tutorial. All it takes is hitting the endpoint with a basic fetch statement, and then parsing the data that is returned and displaying it on your html page. On Firefox, the background behind fields is not blurry but despite this, it still looks nice.Getting the status of a Minecraft server is very easy using the free API. It presents the best on the Chromium-based browser. The frontend is written pure html5, css3, and javascript. ![]() I fix that by replacing the string with more useful information. Unfortunately, sometimes mods versions are reported as "version" or "ANY" string. If the server you queried was an SRV record we will attempt to resolve it and provide data for the original IP address. Cache information is sent in the HTTP headers, which are explained here. The response for this endpoint will be a PNG image. Then it parses received JSON and converts it to the form I find more useful. To try this API, click the button on the right: PNG response will be shown here Response Explained. The backend pings the server using raw sockets. The important thing to notice is that the frame id and title must be identical, e.g.:įor the backend, I use java and spring. The frame will adjust its width and height after fetching the data or pressing the mod list button. ( DEPRICATED) You can put the status banner on your website using an iframe. addEventListener ( 'message', function ( event ) ) You also need to define message event handler e.g.: You can use the server-side frontend, e.g.: I recommend putting the frontend in a separate directory on your webserver. /api/fixed - server status with fixing mods version./api/ - server status without fixing mods version.The only thing you need to do to configure the fronted is to put the backend URL in the 9th line of index.html. You can run the backend standalone or on a dedicated enterprise server (e.g. You also can change the timeout and allowed origins but I recommend leaving it unchanged. Head over to to grab the latest and greatest plugin JAR. It allows for server admins to query and interact with their servers using simple REST semantics. Open the src/main/resources/application.properties file and set the host address (optionally the port, if needed). ServerTap is a REST API for Bukkit, Spigot, and PaperMC Minecraft servers. To use this application, you must configure the backend first. This version uses the Thymeleaf template engine. Moreover, I've implemented a server-side frontend version that is available under /. The status REST endpoints have been moved / -> /api and /fixed -> /api/fixed! There is 1 other project in the npm registry using minecraft-server-status. Start using minecraft-server-status in your project by running npm i minecraft-server-status. Now you can ping any server you want! Just add host, port params and name (only GUI) params to url. Latest version: 1.0.1, last published: 3 years ago. The existing API's were, at least, unsatisfying for me. I decided to make a simple web app with server info. I find it helpful to be able to check on my mobile, e.g, who's currently playing. I've recently started hosting a Forge Minecraft server to play with my friends. ![]() the number of online players with their nicknames,.A simple API and frontend that provides information about a (Forge) Minecraft server such as: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |