Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Minecraft Server Status Handler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miniontoby
Minecraft Server Status Handler
Commits
ec8874bf
Commit
ec8874bf
authored
3 years ago
by
Miniontoby
Browse files
Options
Downloads
Patches
Plain Diff
Added README.md
parent
f146d9f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+53
-0
53 additions, 0 deletions
README.md
with
53 additions
and
0 deletions
README.md
0 → 100644
+
53
−
0
View file @
ec8874bf
# 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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment