Modrinth · Minecraft mod
Offline Player Cache
Allows mods to cache serverside player data when offline.
Quick answer
Which Offline Player Cache release matches 1.19?
Offline Player Cache 0.6.3 targets 1.19 with Fabric. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.
Where it goes
Is Offline Player Cache required on the client, server, or both?
Do not install it on the client. It must be installed on the dedicated server.
This file is marked server-only.
What else does Offline Player Cache 0.6.3 need?
0.6.3 on 1.19. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Offline Player Cache without breaking your instance.
Built for Offline Player Cache 0.6.3 on 1.19. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 0.6.3. It targets 1.19 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
Do not install it on the client. It must be installed on the dedicated server.
- 04
Pick the file you checked
Use the “Get this file” button beside 0.6.3. It opens that exact file at the source.
About this project
What does Offline Player Cache add?
What is Offline Player Cache?
Offline Player Cache (OPC) is a Minecraft API mod built using the Fabric framework to allow caching player data on the server while the player is offline. This means that mods can use this API to access offline player's data. This was primarily developed as a way to allow global and persistent leaderboards for Minecraft servers that included offline players.
Specific Capabilities
Mods can register functions that take in a player and output a value/object; this value/object is limited only by what is specified in the key's read/write to/from nbt data. When a player disconnects from a server, all registered functions are called and the respective data is cached on the server before the player disconnects. This data is saved to the server's level data, and can be accessed any time. When the same player connects to the server, their cached data is deleted and instead when a value function is called, it returns the current value/object based on the online player.
Commands
/opc get uuid|name <uuid|name> <key>Returns the input uuid/name player's value; if they are online, returns their current value, if they are offline returns their cached value; else returns null. If the value is aninstanceofNumberand run from a command block, the redstone output is the absolute modulus of 16./opc remove uuid|name <uuid|name> <key>If the input uuid/name player is offline, removes that player's cached value determined by the input key; if the player is online, does nothing./opc remove uuid|name <uuid|name>If the input uuid/name player is offline, removes all of their cached data; if the player is online, does nothing.
Notes
- This API mod does not itself register any cacheable values, and hence does not cache any player data, and therefore does nothing by itself.
- To use this API in your mod, you can include the following in your gradle build (see Modrinth Maven for more details):
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:offline-player-cache:<version>"
include "maven.modrinth:offline-player-cache:<version>"
}
Project description from Modrinth.
Pick your setup
Offline Player Cache by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.19
1 loader build1.18.2
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Offline Player Cache versions and loaders
0.6.3
opc-0.6.3.jar
28 Aug 2022
0.6.1
opc-0.6.1.jar
29 Jul 2022
0.6.0
opc-0.6.0.jar
12 Jul 2022
Looking for an older file? The official Modrinth project page is in Resources.