A RESTful API which provides documentation for Minecraft's server.properties
Find useful information about Minecraft’s Java Edition server configuration file, server.properties, with this simple, RESTful API!
Make a simple GET request and decode the JSON response!
To get the whole documentation: GET http://api.mcbonanza.games/serverproperties/v1/
To get a single key: GET http://api.mcbonanza.games/serverproperties/v1/{key}
, where {key}
is a valid server.properties key.
To get metadata (such as the default limit value and the possible value types): GET http://api.mcbonanza.games/serverproperties/v1/meta/
GET http://api.mcbonanza.games/serverproperties/v1/
)
{
"options": {
"contains": "",
"type": "",
"upcoming": ""
},
"properties": [
{
"name": "allow-flight",
"type": "boolean",
"defaultValue": "false",
"values": {
"min": 0,
"max": 1,
"possible": ["false", "true"]
},
"description": "Allows users to ...",
"upcoming": false,
"upcomingVersion": ""
}
...
]
}
You can filter your requests with the provided options!
contains
option only returns the properties that contain the substring the key is attributedtype
option only returns the properties of the requested typeupcoming
option only returns properties that are going to be implemented in future versions, if "true"
, or only properties currently available, if "false"
Example request: GET http://api.mcbonanza.games/serverproperties/v1/?upcoming=true&type=integer
{
"options": {
"contains": "",
"type": "integer",
"upcoming": "true"
},
"properties": [
{
"name": "entity-broadcast-range-percentage",
"type": "integer",
"defaultValue": "100",
"values": {
"min": 0,
"max": 500,
"possible": []
},
"description": "Controls how close ...",
"upcoming": true,
"upcomingVersion": "JE 1.16"
}
]
}
If there is no property that matches your options, an empty array will be returned.
GET http://api.mcbonanza.games/serverproperties/v1/difficulty
)
{
"name": "difficulty",
"type": "string",
"defaultValue": "easy",
"values": {
"min": -2147483648,
"max": -2147483648,
"possible": ["peaceful", "easy", "normal", "hard"]
},
"description": "Defines the difficulty ...",
"upcoming": false,
"upcomingVersion": ""
}
GET http://api.mcbonanza.games/serverproperties/v1/sarmale
). The errors are appended to the array in the order they occur.
{
"errors": [
{
"error": "404 Not Found, key \"sarmale\" doesn't exist",
"retry": false
}
]
}
The API scrapes the official Minecraft Wiki page (specifically the server.properties page), also evaluating
the mentioned values and limits a property can be assigned. The math expressions are evaluated using math.js web service. Then the data
is sent to the user, caching it if possible.
Fork this project, create a branch from develop, do your work, and open a pull request in the origin’s develop branch.
Don’t forget to get the module’s dependencies! Use goimports to format the code and LF line endings.