Add interfaces for custom TabAPI, just need to add the hooks now, and of course a pretty example. As always, not tested yet.

This commit is contained in:
md_5
2013-06-08 13:51:23 +10:00
parent b75a2b5060
commit 9b9addfccd
2 changed files with 188 additions and 0 deletions

View File

@@ -0,0 +1,58 @@
package net.md_5.bungee.api;
/**
* Represents a custom tab list, which may have slots manipulated.
*/
public interface TabAPI
{
/**
* Blank out this tab list and update immediately.
*/
void clear();
/**
* Gets the columns in this list.
*
* @return the width of this list
*/
int getColumns();
/**
* Gets the rows in this list.
*
* @return the height of this list
*/
int getRows();
/**
* Get the total size of this list.
*
* @return {@link #getRows()} * {@link #getColumns()}
*/
int getSize();
/**
* Set the text in the specified slot and update immediately.
*
* @param row the row to set
* @param column the column to set
* @param text the text to set
*/
void setSlot(int row, int column, String text);
/**
* Set the text in the specified slot.
*
* @param row the row to set
* @param column the column to set
* @param text the text to set
* @param update whether or not to invoke {@link #update()} upon completion
*/
void setSlot(int row, int column, String text, boolean update);
/**
* Flush all queued changes to the user.
*/
void update();
}