Developers

The SIMPLE steps of adding STAB

1- JavaDocs

First thing your going to want to do is checkout the javadocs so that you can learn about all the goodies that are in STAB!

2- Making a TabObject

In this example, we will be making a 1 class plugin named MyTab. First thing we have to do is make a new TabObject.

TabObject obj = new TabObject(this, TabPriority.HIGH);

3- Configuring that TabObject

Now that we have a TabObject, let us have it do something fun :D.

obj.setTab(0,0,"Hello");
obj.setTab(1,0,"My");
obj.setTab(2,0,"Crazy");
obj.setTab(0,1,"PEOPLES!");

4- Sending that TabObject

Time for the easiest part, now we have a lot of options on how we want to send it, but I think the easiest is just to send it to everyone:

STAB.sendTabToAll(obj);

There we go, it's that simple!

Other usefull tools

  • SafePlayerJoin/QuitEvent - If you want to send a TabList to a player, please listen for these 2 events, they are called 2 ticks after the Bukkit event.
  • The STAB static methods - There are a lot of usefull static methods, you can read about them in the JavaDocs

Comments

Posts Quoted:
Reply
Clear All Quotes