Home›Java›Mods›Web Restful API for PvpTitles
Web Restful API for PvpTitles
ModsJava

Web Restful API for PvpTitles

Java mod listed for Minecraft 1.7–1.14. Download on the author's site.

⬇ Download on Spigot
If you are lazy or don't know how to make an restful server that take your rank data from mysql, then this plugin may help you.

Dependencies
This plugin using javalin as restful libraries that you just need to install pvptitles as dependency then this plugin will work on the background.

How to use
here's the config.yml

Code (YAML):
# the port that restful will run on
web-port
: 7000
# whether to allow all IP access your restful
cors-enable-all
: true
# if not, specifics some IPs
cors-allowed-list
:
 - 127.0.0.1
# max limit of players data of pvptitles
max-limit
: 100

# the token value will generate after the server run
# if you remove the path, it will auto generate the new token
# the token only need to be used when refreshing data
# after refreshing data, it will auto generate a new token and save to the config
token
:
let your website to be http://localhost/
if your web port is 7000
then your restful url should like http://localhost:7000/

Supporting paths

GET: /list ?limit=<number> - return a list of player data with a limited number

query parameters:
showcase: (caz i only have one data :p )

[​IMG]
[​IMG]



GET: /info/<uuid> - return a rank info of that player
no query parameters

showcase:
[​IMG]
[​IMG]

POST: /refresh - clear the caches of rank data and renew it. The request /list and /info are just getting the caches from plugin but not getting real time data. If you wish to clear the old caches and cache a latest data, use this request.

body parameters:
response:
showcase:


Attention
sometimes you may get an Exception like this
[​IMG]

Actually, it is an exception in java. For example, the reason you got this exception is because the data size is only 1, but
you set the starting index to 5.

If you want more details (usually for developer to debug), try to add a query parameter "debug=true", then you will get like this
[​IMG]
[​IMG]

If you want to access the data from other host, make sure you have exposed a port for this!
Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Web Restful API for PvpTitles is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 136 times (via Spigot). Download it and open it directly in the game.

Explore more