Show live player positions on Minecraft Overviewer (Demo)
- Inspired by PlayerMarkers
- Uses Minotar for player heads
- Build with Vue.js
Follow to instructions on how to install the Web-API and move with these steps:
Copy index.html
and dist
to the webassets
directory, so Overviewer will use them on the next update.
λ cp index.html <minecraft>/webassets
λ cp -r dist/ <minecraft>/webassets
Add customwebassets
option to you Overviewer config file
customwebassets = "<minecraft>/webassets"
Add your Web-API URL and the overviewer
API key to index.html
.
window.settings = {
webapi: {
url: 'http://<minecraft-webapi-url>',
key: 'overviewer'
}
}
Apply the following changes to <minecraft>/config/webapi/permissions.conf
.
Disable the whitelist because the API has to be accessible for everyone.
useWhitelist=false
Add an overviewer
key with the following permissions.
keys {
overviewer {
permissions {
info {
"*"=false
info {
"*"=false
motd=true
players=true
maxPlayers=true
minecraftVersion=true
}
}
player {
list {
"*"=false
location="*"
name=true
uuid=true
}
one {
boots="*"
chestplate="*"
experience="*"
food="*"
gameMode="*"
health="*"
helmet="*"
latency=true
leggings="*"
location="*"
name=true
uuid=true
}
}
}
# disable rate limit
rateLimit=0
}
}
Add proxy settings for the Web-API endpoints to allow the X-WEBAPI-KEY
header.
location /api {
proxy_pass http://localhost:<webapi-port>/api;
proxy_http_version 1.1;
# allow authentication header
add_header 'Access-Control-Allow-Headers' 'X-WEBAPI-KEY';
# pre-flight info is valid for 20 days
add_header 'Access-Control-Max-Age' 1728000;
# only allow GET and OPTIONS methods
add_header 'Allow' 'GET, OPTIONS';
# disable logs
access_log off;
error_log off;
}
proxy /api localhost:<webapi-port> {
# allow authentication header
header_downstream Access-Control-Allow-Headers "X-WEBAPI-KEY"
# pre-flight info is valid for 20 days
header_downstream Access-Control-Max-Age 1728000
# only allow GET and OPTIONS methods
header_downstream Allow "GET, OPTIONS"
}
# install dependencies
npm install
# let webpack proxy all traffic to a running Minecraft Overviewer
export WEBPACK_PROXY_MINECRAFT_API='<minecraft-overviewer>'
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
For a detailed explanation of how things work, consult the docs for vue-loader.