mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
Add NameTag visibility API to the Team interface.
This commit is contained in:
parent
935e6dd939
commit
23759bcb40
2 changed files with 37 additions and 0 deletions
21
src/main/java/org/bukkit/scoreboard/NameTagVisibility.java
Normal file
21
src/main/java/org/bukkit/scoreboard/NameTagVisibility.java
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
package org.bukkit.scoreboard;
|
||||||
|
|
||||||
|
public enum NameTagVisibility {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Always show the player's nametag.
|
||||||
|
*/
|
||||||
|
ALWAYS,
|
||||||
|
/**
|
||||||
|
* Never show the player's nametag.
|
||||||
|
*/
|
||||||
|
NEVER,
|
||||||
|
/**
|
||||||
|
* Show the player's nametag only to his own team members.
|
||||||
|
*/
|
||||||
|
HIDE_FOR_OTHER_TEAMS,
|
||||||
|
/**
|
||||||
|
* Show the player's nametag only to members of other teams.
|
||||||
|
*/
|
||||||
|
HIDE_FOR_OWN_TEAM;
|
||||||
|
}
|
|
@ -110,6 +110,22 @@ public interface Team {
|
||||||
*/
|
*/
|
||||||
void setCanSeeFriendlyInvisibles(boolean enabled) throws IllegalStateException;
|
void setCanSeeFriendlyInvisibles(boolean enabled) throws IllegalStateException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the team's ability to see name tags
|
||||||
|
*
|
||||||
|
* @return the current name tag visibilty for the team
|
||||||
|
* @throws IllegalArgumentException if this team has been unregistered
|
||||||
|
*/
|
||||||
|
NameTagVisibility getNameTagVisibility() throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set's the team's ability to see name tags
|
||||||
|
*
|
||||||
|
* @param visibility The nameTagVisibilty to set
|
||||||
|
* @throws IllegalArgumentException if this team has been unregistered
|
||||||
|
*/
|
||||||
|
void setNameTagVisibility(NameTagVisibility visibility) throws IllegalArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the Set of players on the team
|
* Gets the Set of players on the team
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue