CobbleSuite Library By WhosLucid
A core utility library for Cobblemon NeoForge mods providing virtual economy (Cobbletokens), permissions, UI framework, and Pokemon helpers.
A simple virtual currency system with balances stored in economy.json:
/cobbletokens command for players to manage their tokensIntegrates with FTB Ranks for permission checks with automatic fallback to vanilla op levels.
PermissionApi.hasPermission(player, "permission.node", opLevel);
GooeyLibs-based GUI utilities:
ConfirmMenu - Confirmation dialogsPartyPcMenu - Party/PC Pokemon selection interfaceAdventureTranslator - Convert legacy color codes (&a, &l) and hex (&#RRGGBB) to ComponentsPlayerUtils - Chat, actionbar, and broadcast messagingPokemonUtils - Placeholder replacement and stat helpersItemModel - ItemStack builder with display name, lore, NBT support/cobbletokens)| Command | Permission | Description |
|---|---|---|
/cobbletokens |
cobblelib.tokens |
Check your balance |
/cobbletokens balance [player] |
cobblelib.tokens / cobblelib.tokens.admin |
Check balance (admin for others) |
/cobbletokens send <player> <amount> |
cobblelib.tokens |
Send tokens to another player |
/cobbletokens pay <player> <amount> |
cobblelib.tokens |
Alias for send |
/cobbletokens give <player> <amount> |
cobblelib.tokens.admin |
Give tokens to a player |
/cobbletokens take <player> <amount> |
cobblelib.tokens.admin |
Take tokens from a player |
/cobbletokens set <player> <amount> |
cobblelib.tokens.admin |
Set a player's balance |
/cobblelib)| Command | Permission | Description |
|---|---|---|
/cobblelib reload |
cobblelib.reload |
Reload all configs |
/cobblelib info |
cobblelib.base |
Display mod info |
Config files are located at config/cobblelib/
{
"debug": false,
"useDefault": true,
"economySymbol": "Cobbletokens"
}
Located at config/cobblelib/lang/en.json
import com.whoslucid.cobblelib.api.EconomyApi;
// Check balance
BigDecimal balance = EconomyApi.getBalance(playerUUID, null);
// Add money
EconomyApi.addMoney(playerUUID, BigDecimal.valueOf(100), null);
// Remove money
EconomyApi.removeMoney(playerUUID, BigDecimal.valueOf(50), null);
// Transfer between players
EconomyApi.transfer(fromUUID, toUUID, 100);
// Check and deduct
boolean success = EconomyApi.hasEnoughMoney(playerUUID, BigDecimal.valueOf(100), null, true);
// Get currency symbol
String symbol = EconomyApi.getSymbol(null);
import com.whoslucid.cobblelib.api.PermissionApi;
// Check permission with op fallback
boolean allowed = PermissionApi.hasPermission(player, "your.permission", 2);
import com.whoslucid.cobblelib.util.AdventureTranslator;
Component text = AdventureTranslator.toComponent("&aGreen &lBold &#FF5555Custom Hex");
./gradlew build
Output: build/libs/cobblelib-1.0.0.jar
All rights reserved.