Add scoreboard packets + API classes. Still unimplemented.

This commit is contained in:
md_5
2013-03-16 20:48:51 +11:00
parent 34f4bae923
commit 156ea30c32
12 changed files with 149 additions and 21 deletions

View File

@@ -0,0 +1,20 @@
package net.md_5.bungee.api.scoreboard;
import lombok.Data;
/**
* Represents an objective entry.
*/
@Data
public class Objective
{
/**
* Name of the objective.
*/
private final String name;
/**
* Value of the objective.
*/
private final String value;
}

View File

@@ -0,0 +1,10 @@
package net.md_5.bungee.api.scoreboard;
/**
* Represents locations for a scoreboard to be displayed.
*/
public enum Position
{
LIST, SIDEBAR, BELOW;
}

View File

@@ -0,0 +1,24 @@
package net.md_5.bungee.api.scoreboard;
import lombok.Data;
/**
* Represents a scoreboard score entry.
*/
@Data
public class Score
{
/**
* Name to be displayed in the list.
*/
private final String itemName;
/**
* Unique name of the score.
*/
private final String scoreName;
/**
* Value of the score.
*/
private final int value;
}

View File

@@ -1,5 +1,6 @@
package net.md_5.bungee.api.scoreboard;
import java.util.Collection;
import lombok.Data;
@Data
@@ -11,7 +12,15 @@ public class Scoreboard
*/
private final String name;
/**
* Text to be displayed with this scoreboard.
* Position of this scoreboard.
*/
private final String text;
private final Position position;
/**
* Objectives for this scoreboard.
*/
private final Collection<Objective> objectives;
/**
* Scores for this scoreboard.
*/
private final Collection<Score> scores;
}