Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-17 01:23:43 +02:00
Commit API
Dieser Commit ist enthalten in:
Ursprung
0b807569ad
Commit
8460c157a5
122
src/main/java/us/myles/ViaVersion/api/Boss/BossBar.java
Normale Datei
122
src/main/java/us/myles/ViaVersion/api/Boss/BossBar.java
Normale Datei
@ -0,0 +1,122 @@
|
|||||||
|
package us.myles.ViaVersion.api.boss;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface BossBar {
|
||||||
|
/**
|
||||||
|
* Change the title
|
||||||
|
*
|
||||||
|
* @param title Title can be in either JSON or just text
|
||||||
|
*/
|
||||||
|
void setTitle(String title);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current title
|
||||||
|
*
|
||||||
|
* @return the title
|
||||||
|
*/
|
||||||
|
String getTitle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the health
|
||||||
|
*
|
||||||
|
* @param health this float has to be between 0F - 1F
|
||||||
|
*/
|
||||||
|
void setHealth(float health);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the health
|
||||||
|
*
|
||||||
|
* @return float between 0F - 1F
|
||||||
|
*/
|
||||||
|
float getHealth();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Yay colors!
|
||||||
|
*
|
||||||
|
* @param color Whatever color you want!
|
||||||
|
*/
|
||||||
|
void setColor(BossColor color);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bossbar color
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BossColor getColor();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change the bosbar style
|
||||||
|
*
|
||||||
|
* @param style BossStyle
|
||||||
|
*/
|
||||||
|
void setStyle(BossStyle style);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bosbar style
|
||||||
|
*
|
||||||
|
* @return BossStyle
|
||||||
|
*/
|
||||||
|
BossStyle getStyle();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the bossbar to a player.
|
||||||
|
*
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
void addPlayer(Player player);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the bossbar from a player
|
||||||
|
*
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
void removePlayer(Player player);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add flags
|
||||||
|
*
|
||||||
|
* @param flag
|
||||||
|
*/
|
||||||
|
void addFlag(BossFlag flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove flags.
|
||||||
|
*
|
||||||
|
* @param flag
|
||||||
|
*/
|
||||||
|
void removeFlag(BossFlag flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param flag
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean hasFlag(BossFlag flag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get players
|
||||||
|
*
|
||||||
|
* @return UUIDS from players (sorry I lied)
|
||||||
|
*/
|
||||||
|
Set<UUID> getPlayers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the bossbar to everyone (In the getPlayer set)
|
||||||
|
*/
|
||||||
|
void show();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the bossbar from everyone (In the getPlayer set)
|
||||||
|
*/
|
||||||
|
void hide();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is it visible?
|
||||||
|
*
|
||||||
|
* @return visibility changable with show() and hide()
|
||||||
|
*/
|
||||||
|
boolean isVisible();
|
||||||
|
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren