Add scoreboard packets + API classes. Still unimplemented.
This commit is contained in:
@@ -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;
|
||||
}
|
@@ -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;
|
||||
}
|
24
api/src/main/java/net/md_5/bungee/api/scoreboard/Score.java
Normal file
24
api/src/main/java/net/md_5/bungee/api/scoreboard/Score.java
Normal 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;
|
||||
}
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user