mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Add missing team sidebar display slots
This commit is contained in:
parent
b4f3eb5fa1
commit
34f10b78da
1 changed files with 48 additions and 19 deletions
|
@ -1,26 +1,55 @@
|
||||||
package org.bukkit.scoreboard;
|
package org.bukkit.scoreboard;
|
||||||
|
|
||||||
|
import net.kyori.adventure.text.format.NamedTextColor; // Paper
|
||||||
/**
|
/**
|
||||||
* Locations for displaying objectives to the player
|
* Locations for displaying objectives to the player
|
||||||
*/
|
*/
|
||||||
public enum DisplaySlot {
|
public enum DisplaySlot {
|
||||||
BELOW_NAME,
|
// Paper start
|
||||||
PLAYER_LIST,
|
BELOW_NAME("below_name"),
|
||||||
SIDEBAR,
|
PLAYER_LIST("list"),
|
||||||
SIDEBAR_BLACK,
|
SIDEBAR("sidebar"),
|
||||||
SIDEBAR_DARK_BLUE,
|
SIDEBAR_TEAM_BLACK(NamedTextColor.BLACK),
|
||||||
SIDEBAR_DARK_GREEN,
|
SIDEBAR_TEAM_DARK_BLUE(NamedTextColor.DARK_BLUE),
|
||||||
SIDEBAR_DARK_AQUA,
|
SIDEBAR_TEAM_DARK_GREEN(NamedTextColor.DARK_GREEN),
|
||||||
SIDEBAR_DARK_RED,
|
SIDEBAR_TEAM_DARK_AQUA(NamedTextColor.DARK_AQUA),
|
||||||
SIDEBAR_DARK_PURPLE,
|
SIDEBAR_TEAM_DARK_RED(NamedTextColor.DARK_RED),
|
||||||
SIDEBAR_GOLD,
|
SIDEBAR_TEAM_DARK_PURPLE(NamedTextColor.DARK_PURPLE),
|
||||||
SIDEBAR_GRAY,
|
SIDEBAR_TEAM_GOLD(NamedTextColor.GOLD),
|
||||||
SIDEBAR_DARK_GRAY,
|
SIDEBAR_TEAM_GRAY(NamedTextColor.GRAY),
|
||||||
SIDEBAR_BLUE,
|
SIDEBAR_TEAM_DARK_GRAY(NamedTextColor.DARK_GRAY),
|
||||||
SIDEBAR_GREEN,
|
SIDEBAR_TEAM_BLUE(NamedTextColor.BLUE),
|
||||||
SIDEBAR_AQUA,
|
SIDEBAR_TEAM_GREEN(NamedTextColor.GREEN),
|
||||||
SIDEBAR_RED,
|
SIDEBAR_TEAM_AQUA(NamedTextColor.AQUA),
|
||||||
SIDEBAR_LIGHT_PURPLE,
|
SIDEBAR_TEAM_RED(NamedTextColor.RED),
|
||||||
SIDEBAR_YELLOW,
|
SIDEBAR_TEAM_LIGHT_PURPLE(NamedTextColor.LIGHT_PURPLE),
|
||||||
SIDEBAR_WHITE;
|
SIDEBAR_TEAM_YELLOW(NamedTextColor.YELLOW),
|
||||||
|
SIDEBAR_TEAM_WHITE(NamedTextColor.WHITE);
|
||||||
|
|
||||||
|
public static final net.kyori.adventure.util.Index<String, DisplaySlot> NAMES = net.kyori.adventure.util.Index.create(DisplaySlot.class, DisplaySlot::getId);
|
||||||
|
|
||||||
|
private final String id;
|
||||||
|
|
||||||
|
DisplaySlot(@org.jetbrains.annotations.NotNull String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
DisplaySlot(@org.jetbrains.annotations.NotNull NamedTextColor color) {
|
||||||
|
this.id = "sidebar.team." + color;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the string id of this display slot.
|
||||||
|
*
|
||||||
|
* @return the string id
|
||||||
|
*/
|
||||||
|
public @org.jetbrains.annotations.NotNull String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue