SPIGOT-1776: Replace BossBar.hide/show with visibility.

This commit is contained in:
md_5 2016-03-06 09:55:36 +11:00
parent 249c5f0680
commit d6a61e3e5d
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/net/minecraft/server/BossBattleServer.java
+++ b/net/minecraft/server/BossBattleServer.java
@@ -10,7 +10,7 @@
private final Set<EntityPlayer> h = Sets.newHashSet();
private final Set<EntityPlayer> i;
- private boolean j;
+ public boolean j; // PAIL: rename / public
public BossBattleServer(IChatBaseComponent ichatbasecomponent, BossBattle.BarColor bossbattle_barcolor, BossBattle.BarStyle bossbattle_barstyle) {
super(MathHelper.a(), ichatbasecomponent, bossbattle_barcolor, bossbattle_barstyle);

View File

@ -146,6 +146,16 @@ public class CraftBossBar implements BossBar {
return players.build();
}
@Override
public void setVisible(boolean visible) {
handle.setVisible(visible);
}
@Override
public boolean isVisible() {
return handle.j;
}
@Override
public void show() {
handle.setVisible(true);