Skip to content
Snippets Groups Projects
Commit ec8874bf authored by Miniontoby's avatar Miniontoby :writing_hand_tone1:
Browse files

Added README.md

parent f146d9f4
No related branches found
No related tags found
No related merge requests found
# Minecraft Server Status Handler
A Handler for Lukasss93's PHP library to check Minecraft Servers Status
# Installation
To install you need to clone this repo first:
```bash
git clone https://edugit.org/Miniontoby/minecraft-server-status-handler.git
cd minecraft-server-status-handler/
```
Then copy the `MCHandler.php`, `minecraft.css`, `pack.png` and `vendor/` to your website folder
# Usage
Add the minecraft.css stylesheet to your website in your head tag:
```html
<link rel="stylesheet" href="minecraft.css">
```
Then somewhere in your body tag where you want your server status add this:
```php
<?php
include_once('MCHandler.php');
echo MCHandler::HandleServers([
['hostname' => 'play.cubecraft.com']
]);
?>
```
And if you now go to your website, you should be able to see the Cubecraft server status
# Configuration
For the `MCHandler::HandleServers` you need to supply settings.
These settings are in an array inside an array, so you can do multiple servers at a time
You can add the following parameters for each server:
Parameter | Type | Default | Description
----------|--------|-----------|-----------
hostname | string | 127.0.0.1 | Server Hostname or IP address
port | int | 25565 | Server port
type | string | java | java or bedrock
method | string | ping | ping or query
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment