Skip to content

Releases

1.8.5.1

1.8.5.1 Pre-release
Pre-release

Choose a tag to compare

@maximjsx maximjsx released this 30 Mar 20:24
  • Additional custom leaderboard type

Examples:

SwitchableLeaderboard leaderboard = new SwitchableLeaderboard("pvp_stats");


SwitchableLeaderboard.StatMode winsMode = new SwitchableLeaderboard.StatMode("wins", "Top Wins");
LeaderboardHologram winsPage1 = createLeaderboardPage("wins_p1", "Top Wins", 10);

winsPage1.setPlayerScore(uuid1, "Player1", 150);
winsPage1.setPlayerScore(uuid2, "Player2", 145);
winsPage1.update();
winsMode.addPage(winsPage1);
leaderboard.addStatMode(winsMode);


SwitchableLeaderboard.StatMode killsMode = new SwitchableLeaderboard.StatMode("kills", "Top Kills");
LeaderboardHologram killsPage1 = createLeaderboardPage("kills_p1", "Top Kills", 10);
killsPage1.setPlayerScore(uuid1, "Player1", 1250);
killsPage1.update();
killsMode.addPage(killsPage1);
leaderboard.addStatMode(killsMode);


SwitchableLeaderboard.StateButton button = new SwitchableLeaderboard.StateButton.Builder("stat_switch")
        .addState("<yellow>Top Wins</yellow>", "wins")
        .addState("<red>Top Kills</red>", "kills")
        //location of ur custom button
        .setRelativePosition(0, -2.5, 0)
        .setScale(6, 3, 1)
        .onStateChange((player, stateIndex) -> {
            String statMode = stateIndex == 0 ? "wins" : "kills";
            leaderboard.switchStatMode(player, statMode);
        })
        .build();

leaderboard.addStateButton(button);


hologramManager.spawn(leaderboard, location);

Create a leaderboard with time filter (Global/Monthly/Weekly/Daily) and scope filter (All/Friends):`

SwitchableLeaderboard leaderboard = new SwitchableLeaderboard("advanced_pvp");

String[] timeFilters = {"global", "monthly", "weekly", "daily"};
String[] scopeFilters = {"all", "friends"};

for (String time : timeFilters) {
    for (String scope : scopeFilters) {
        String statId = "kills_" + time + "_" + scope;
        StatMode mode = new StatMode(statId, "Kills - " + time + " - " + scope);
        
        LeaderboardHologram page = createPage(statId);
        loadDataForFilters(page, time, scope); // ur data loading logic
        mode.addPage(page);
        
        leaderboard.addStatMode(mode);
    }
}

// filter button with 4 states
StateButton timeButton = new StateButton.Builder("time_filter")
        .addState("<gradient:#00ff00:#00aa00>GLOBAL</gradient>", "global")
        .addState("<gradient:#ffaa00:#ff6600>MONTHLY</gradient>", "monthly")
        .addState("<gradient:#00aaff:#0066ff>WEEKLY</gradient>", "weekly")
        .addState("<gradient:#ff00ff:#aa00aa>DAILY</gradient>", "daily")
        .setRelativePosition(-4, -2.5, 0)
        .setScale(5, 2.5f, 1)
        .onStateChange((player, stateIndex) -> {
            updateFilters(leaderboard, player);
        })
        .build();

StateButton scopeButton = new StateButton.Builder("scope_filter")
        .addState("<aqua>👥 ALL PLAYERS</aqua>", "all")
        .addState("<yellow>⭐ FRIENDS</yellow>", "friends")
        .setRelativePosition(4, -2.5, 0)
        .setScale(5, 2.5f, 1)
        .onStateChange((player, stateIndex) -> {
            updateFilters(leaderboard, player);
        })
        .build();

leaderboard.addStateButton(timeButton);
leaderboard.addStateButton(scopeButton);

hologramManager.spawn(leaderboard, location);

1.8.5

Choose a tag to compare

@maximjsx maximjsx released this 24 Mar 18:59

What's Changed

  • Interactable holograms

  • New head component in leaderboards

    • Bedrock supported
  • Removed resourcepack support for heads

  • Removed persistant holograms

Download
dependencies {
    compileOnly "com.github.HologramLib:HologramLib:1.8.5"
}

Full Changelog: 1.8.3...1.8.5

1.8.3

Choose a tag to compare

@maximjsx maximjsx released this 30 Oct 13:19

What's Changed

  • Bump depdendency versions
  • Bug fixes
Download
Download
dependencies {
    compileOnly "com.github.HologramLib:HologramLib:1.8.3.2"
}

Full Changelog: 1.8.2...1.8.3

1.8.2

Choose a tag to compare

@maximjsx maximjsx released this 11 Oct 22:54
e04e827

What's Changed

Download
Download

Full Changelog: 1.8.1...1.8.2

1.8.1

Choose a tag to compare

@maximjsx maximjsx released this 03 Sep 09:38

What's Changed

  • Dependency updates
    • Updated version of FoliaLib
    • Updated version of packetevents
    • Updated version of EntityLib
Download
Download

Full Changelog: 1.8.0...1.8.1

1.8.0 - The Leaderboards Update

Choose a tag to compare

@maximjsx maximjsx released this 07 Aug 17:43
Download

What's Changed

  • Add placeholder api support by @Fedox-die-Ente in #37
  • Leaderboards and more by @maximjsx in #40
    • Introduced interactive hologram entities "InteractionBox" that respond to player interactions.
    • Added customizable, multi-page leaderboard holograms with player head support and flexible formatting.
    • Added player head rendering and caching utilities with asynchronous skin and head retrieval.

Breaking Changes in the API 🚨

If you are already using HologramLib's leaderboards, you MUST update your plugin before updating HologramLib on your server ⚠️

Everything regarding Leaderboards is new including imports!

Here is a small example:

Map<UUID, LeaderboardHologram.PlayerScore> scores = new HashMap<>();

LeaderboardHologram.LeaderboardOptions pvpOptions = LeaderboardHologram.LeaderboardOptions.builder()
        .title("PvP Champions")
        .suffix("Kills")
        .showEmptyPlaces(false)
        .maxDisplayEntries(10)
        .sortOrder(LeaderboardHologram.SortOrder.DESCENDING)
        .headMode(LeaderboardHologram.HeadMode.RESOURCEPACK)
        .leaderboardType(LeaderboardHologram.LeaderboardType.ALL_PLAYER_HEADS)
        .build();

LeaderboardHologram pvpLeaderboard = new LeaderboardHologram(pvpOptions, "pvp_lb");
pvpLeaderboard.setAllScores(scores);

/* You can combine the leaderboard with others in a paginated leaderboard
but you can also just spawn the pvpLeaderboard for example
directly using hologramManager.spawn(pvpLeaderboard, location)
*/
PagedLeaderboard pagedLeaderboard = new PagedLeaderboard("paged_holo")
        .addPage(pvpLeaderboard)
        .addPage(<... another page>)
        .setArrowBackgrounds(pvpLeaderboard.getBackgroundHologram().getBackgroundColor())
        .setLeftArrowText("<red><<")
        .setRightArrowText("<red>>>")
        .setArrowOffset(3.5)
        .setClickSounds(Sound.BLOCK_AMETHYST_CLUSTER_FALL, Sound.BLOCK_AMETHYST_CLUSTER_FALL)
        .addPage(economyLeaderboard)
        .rotate(0);
hologramManager.spawn(pagedLeaderboard, location);

For the resourcepack option you also need the resourcepack zip file from below on your server.

Download

Note

The wiki was partially updated already

image

New Contributors

  • @Fedox-die-Ente made their first contribution in #37

Full Changelog: 1.7.7...1.8.0

1.7.7

Choose a tag to compare

@maximjsx maximjsx released this 10 Jul 18:14
  • Bugfixes
    • Attachement issues

Full Changelog: 1.7.6...1.7.7

1.7.6

Choose a tag to compare

@maximjsx maximjsx released this 03 Jul 15:06
  • Added support for NOT_ATTACHED_PLAYER render mode that excludes attached players from viewing the hologram
  • Added Hologram#attachToPlayer(Player)

Full Changelog: 1.7.5...1.7.6

Release 1.7.5

Choose a tag to compare

@maximjsx maximjsx released this 30 Jun 11:37

What's Changed

  • Adding attach and detach methods and setIsInvisible by @misieur in #34
  • Adding a warning to the attach method in the Hologram class by @misieur in #35
  • Bugfixes

Full Changelog: 1.7.4...1.7.5

Release 1.7.4

Choose a tag to compare

@maximjsx maximjsx released this 22 May 18:52

What's Changed

New Contributors

Full Changelog: 1.7.3...1.7.4