#2342: Add score and selector components to chat API

This commit is contained in:
Senmori
2018-02-19 11:47:21 +11:00
committed by md_5
parent e23195f5f2
commit a3b44aa612
11 changed files with 420 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ import net.md_5.bungee.api.SkinConfiguration;
import net.md_5.bungee.api.Title;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.score.Scoreboard;
/**
* Represents a player who's connection is being connected to somewhere else,
@@ -275,4 +276,11 @@ public interface ProxiedPlayer extends Connection, CommandSender
* not occurred for this {@link ProxiedPlayer} yet.
*/
Map<String, String> getModList();
/**
* Get the {@link Scoreboard} that belongs to this player.
*
* @return this player's {@link Scoreboard}
*/
Scoreboard getScoreboard();
}

View File

@@ -62,6 +62,11 @@ public class Scoreboard
scores.put( score.getItemName(), score );
}
public Score getScore(String name)
{
return scores.get( name );
}
public void addTeam(Team team)
{
Preconditions.checkNotNull( team, "team" );