Sueta

TagAPI | Using Packets (Jar and implemented API)

SNAPSHOT-1.1

Small TagAPI

·Plugin

Hey, this is a small TagAPI you can implement in your sourcecode.
Its easy to use.

It can be used like NameTagdEdit:

There will be some folders with a config.yml , a groups.yml and a folder with languages where you can edit the language files (German.yml, English.yml, Custom.yml)
Players can have own custom prefixes and suffixes
They will be saved in a players.yml

With the API you can now add a List of players to which the Nametag, Suffix or Prefix (whatever you are trying to display) will be displayed.
Just add an ArrayList<Player> to the void.

Here's an example:

@EventHandler 
public void onJoin(PlayerJoinEvent event) { 
   String suffix = "Suffix"; 
   if (player.hasPermission("tagapi.admin")) { 
         TagAPI.getInstance().setTag(player, "§4Admin §8┃ §7", suffix,100); 
  } else { 
   TagAPI.getInstance().setTag(player, "§aPlayer§8┃ §7", suffix, 101); 
  } 
}

Priority of a Tag

The higher the priority, the further the name is below.
For example you want Admin to be above Moderator
Then Admin has the priority 100 and Moderator 101.

I hope you'll use this API and maybe let me know some bugs down below.

Similar projects

Plugin →