KrimBoard
This Plugin allows the creation of scoreboards from a plugin, console or commandblock. you can iterate thru the scoreboards by using the book (right click). It can register public, shared and private scoreboards, which are only visible to one user.
Please look at the sourcecode atm for more informations and how to use it.
- SourceCode: http://git.wmchris.de/public
- Latest Snapshot: http://jk.wmchris.de
Compatible Plugins (so far):
- KrimBuy
- KrimSale
- KrimClasses
- KRC
Example implementation in own code
public static Object BoardHelper = null; try { if(Class.forName("de.bdh.board.BoardHelper",false,getClassLoader()) != null) { RegisteredServiceProvider<BoardHelper> KSh = getServer().getServicesManager().getRegistration(BoardHelper.class); if(KSh != null) { BoardHelper = KSh.getProvider(); } else throw new ClassNotFoundException(); } } catch (ClassNotFoundException e) { System.out.println((new StringBuilder()).append("[KB] KrimBoard not found").toString()); }
Example registration of the board helper
bd = BoardHelper.generateNewBoard(); o = bd.registerNewObjective("infos", "dummy"); o.setDisplaySlot(DisplaySlot.SIDEBAR); this.bh.registerPrivateBoard(PLAYER, ID, bd); this.bh.showBoardToPlayer(PLAYER, ID);
Example to remove a board after a few minutes
class removeBoard implements Runnable { BoardListener l; Player p; String id; public removeBoard(BoardListener l, Player p, String id) { this.l = l; this.p = p; this.id = id; } public void run() { this.l.bh.removeBoardFromPlayer(p, this.id); } } Bukkit.getServer().getScheduler().runTaskLater(Plugin, new removeBoard(PLAYER,ID), 10*20); //WIll remove the Board after 10 Seconds
for more informations take a look at the boardhelper class.
Comments