ModsJava
Web Restful API for PvpTitles
Java mod listed for Minecraft 1.7–1.14. Download on the author's site.
⬇ Download on SpigotIf 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
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:
)
GET: /info/<uuid> - return a rank info of that player
no query parameters
showcase:
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:
Attention
sometimes you may get an Exception like this
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
If you want to access the data from other host, make sure you have exposed a port for this!
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 :
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 :
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:
- limit: the max limit
- start (optional) : the rank index to start getting from, default 0
)
GET: /info/<uuid> - return a rank info of that player
no query parameters
showcase:
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:
- token: you must use the token in your config.yml to access this operation.
- new-token: the new generated token that saved in your config.yml
- success: whether the caches has refreshed successfully
Attention
sometimes you may get an Exception like this
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
If you want to access the data from other host, make sure you have exposed a port for this!
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.7, 1.8, 1.9
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
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.