PL
An easy to use API to get per-player configs.
Methods
PlayerConfigAPI pca = new PlayerConfigAPI(this);
pca.exists(player);//Returns true if player config exists, else returns false
pca.createConfig(player);//Creates a config for the player
pca.set(player, configPath, value);//Sets a configPath to a value
pca.getString(player, configPath);////Returns String from configPath
pca.getInteger(player, configPath);//Returns int from configPath
pca.getBoolean(player, configPath);//Returns boolean from configPath
Plugin example
//This plugin example creates a config for each player upon joining
PlayerConfigAPI pca = new PlayerConfigAPI(this);
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onPlayerJoin(PlayerJoinEvent e) {
Player p = e.getPlayer();
if (!pca.exists(p))
{
pca.createConfig(e.getPlayer());
pca.set(p, "lastName", p.getName());
}
}
To do:
- Add more methods (for more variable types)
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta