Add a dependency in your mod class:
[BepInDependency("com.cobwebsh.leaderboards")]
public class Mod : BaseUnityPlugin {
Initialize leaderboards for your mod automatically:
var leaderboard = CobwebLeaderboard.FromPlugin(this);
using the BepInPlugin attribute, or manually with a GUID and name:
var leaderboard = new CobwebLeaderboard("com.reddust9.testmod", "Test Mod");
Add leaderboard entries using the AddEntry method:
leaderboard.AddEntry("player1", 1);
var score = new LeaderboardScore("player2", 2);
leaderboard.AddEntry(score);