Skip to content

ActionBarAPI is a standalone api used to manage action bar displaying with multiple entries in Minecraft

Notifications You must be signed in to change notification settings

Yaniissou/ActionBarAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ActionBarAPI

A system for dynamically displaying and updating Action Bar messages in Minecraft.

Features

  • Send dynamic information to the player's Action Bar.
  • Automatically updates at set intervals (e.g., every second).
  • Supports dynamic calculations for each Action Bar entry.

Usage

import fr.yanissou.actionbarapi.ActionBarAPI;
import fr.yanissou.actionbarapi.model.ActionBarEntry;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

public class PlayerListeners implements Listener {

    @EventHandler
    public void onPlayerJoin(PlayerJoinEvent event) {
        ActionBarAPI.get().addEntry(event.getPlayer().getUniqueId(), new ActionBarEntry("welcome", () -> "§aS§ba§cl§du§t §r!"));
    }
}

Customization

An interface that defines how to retrieve the dynamic value for each entry (e.g., a score or remaining time).

ActionBarAPI.get().addEntry(event.getPlayer().getUniqueId(), new ActionBarEntry("level", () -> String.valueOf(player.getLevel())));

Contributing

Feel free to fork the repository, make improvements, or submit pull requests.

About

ActionBarAPI is a standalone api used to manage action bar displaying with multiple entries in Minecraft

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •  

Languages