ModsJava
PlayerLocations
Java mod listed for Minecraft 1.17. Download on the author's site.
⬇ Download on SpigotA Minecraft plugin built using the Spigot API which sends player location information to a web socket.
This plugin was created after numerous attempts to provide a vanilla Minecraft way of providing player location data to external sources.
This works in conjunction with Overviewer-Info-Plugin which handles the front-end rendering of players on an overviewer map.
Usage
Place the PlayerLocations.jar in the `plugins` directory
Configuration
socket_server.port: The server port to listen for socket requests
socket_server.host: The hostname to listen for socket requests
socket_server.tick_interval: How often, in server ticks, the information should be broadcasted to connected socket clients
Output
The information sent through the web socket is JSON data.
The default output uses the following structure:
Extending
If you would like to add additional information to the socket using a custom plugin, add PlayerLocations to your plugin's dependency or soft dependency list in your `plugin.yml` file:
name : YourPluginName
main : com.your.plugin.YourPlugin
version : 0.17
api-version : 1.17
depend : [PlayerLocations ]
or
softdepend : [PlayerLocations ]
In your plugin project, add PlayerLocationsAPI as a dependency. The JAR is available as an artifact in each
release
In your plugin, use the following example to add an element with a key of "newInformation" and a value of "I've extended the PlayerLocations Plugin!".
package com.your.plugin ;
import com.archmageinc.playerlocations.api.InfoRegistrar ;
import com.archmageinc.playerlocations.api.InfoHandler ;
import org.bukkit.plugin.java.JavaPlugin ;
public class YourPlugin extends JavaPlugin implements InfoHandler {
@Override
public void onEnable ( ) {
InfoRegistrar playerLocationsPlugin = (InfoRegistrar ) getServer ( ). getPluginManager ( ). getPlugin ( "PlayerLocations" ) ;
playerLocationsPlugin. registerInfoHandler ( this ) ;
}
@Override
public Map < String, Object > getInfo ( ) {
Map < String, Object > info = new HashMap ( ) ;
info. put ( "newInformation" , "I've extended the PlayerLocations Plugin!" ) ;
return info ;
}
}
This plugin was created after numerous attempts to provide a vanilla Minecraft way of providing player location data to external sources.
This works in conjunction with Overviewer-Info-Plugin which handles the front-end rendering of players on an overviewer map.
Usage
Place the PlayerLocations.jar in the `plugins` directory
Configuration
Code (YAML):
socket_server:
port : 8888
host : localhost
tick_interval : 100
port : 8888
host : localhost
tick_interval : 100
socket_server.host: The hostname to listen for socket requests
socket_server.tick_interval: How often, in server ticks, the information should be broadcasted to connected socket clients
Output
The information sent through the web socket is JSON data.
The default output uses the following structure:
Code (json (Unknown Language)):
{
"webClients": int,
"timeOfDay": int,
"players":[
{
"name": str,
"position": {
"x": double,
"y": double,
"z": double,
"dimension": str
},
"health": double,
"level": int,
"air": int,
"food": int
},
...
]
}
"webClients": int,
"timeOfDay": int,
"players":[
{
"name": str,
"position": {
"x": double,
"y": double,
"z": double,
"dimension": str
},
"health": double,
"level": int,
"air": int,
"food": int
},
...
]
}
If you would like to add additional information to the socket using a custom plugin, add PlayerLocations to your plugin's dependency or soft dependency list in your `plugin.yml` file:
Code (YAML):
name : YourPluginName
main : com.your.plugin.YourPlugin
version : 0.17
api-version : 1.17
depend : [PlayerLocations ]
Code (YAML):
softdepend : [PlayerLocations ]
In your plugin, use the following example to add an element with a key of "newInformation" and a value of "I've extended the PlayerLocations Plugin!".
Code (Java):
package com.your.plugin ;
import com.archmageinc.playerlocations.api.InfoRegistrar ;
import com.archmageinc.playerlocations.api.InfoHandler ;
import org.bukkit.plugin.java.JavaPlugin ;
public class YourPlugin extends JavaPlugin implements InfoHandler {
@Override
public void onEnable ( ) {
InfoRegistrar playerLocationsPlugin = (InfoRegistrar ) getServer ( ). getPluginManager ( ). getPlugin ( "PlayerLocations" ) ;
playerLocationsPlugin. registerInfoHandler ( this ) ;
}
@Override
public Map < String, Object > getInfo ( ) {
Map < String, Object > info = new HashMap ( ) ;
info. put ( "newInformation" , "I've extended the PlayerLocations Plugin!" ) ;
return info ;
}
}
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft version listed: 1.17
- 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.
PlayerLocations is a free Minecraft Java mod. Compatible with Minecraft 1.17. Downloaded 155 times (via Spigot). Download it and open it directly in the game.