SlateAPI Scoreboards

Scoreboards can sometimes be a pain without using any wrappers or apis, however, SlateAPI may have some extra things that can help the process even easier.

Basic Slates

A Basic slate scoreboard consists of

  • A Name (changable)
  • A List of Lines
  • A List of Viewers (players)
//Create a slate
Slate s = new PhantomSlate(C.RED + "Slate Name");

//Add a viewer
s.addViewer(Bukkit.getPlayer("cyberpwn"));

//Add a line or two
s.addLine(C.RED + "Level: Nether");
s.set(0, C.RED + "Level: Overworld");

//Change the name
s.setName(C.BLUE + "New Name");

//Clear all lines
s.clearLines();

//Bulk set lines
s.setLines(new GList<String>().qadd("Line").qadd("Line 2"));

//Update it
s.update();

Placeholder Slates

Now you can hook into placeholders very simply or use it for loading from configuration files

Slate s = new PlaceholderSlate(C.RED + "Slate");

//Placeholders are automatically updated with update()
s.addLine("This is a %parsed_placeholder%");
s.addViewer(Bukkit.getPlayer("cyberpwn"));
s.update();

results matching ""

    No results matching ""