From d6a61e3e5d9959f8f1dd980fb42043a282b5f26a Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 6 Mar 2016 09:55:36 +1100 Subject: [PATCH] SPIGOT-1776: Replace BossBar.hide/show with visibility. --- nms-patches/BossBattleServer.patch | 11 +++++++++++ .../org/bukkit/craftbukkit/boss/CraftBossBar.java | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 nms-patches/BossBattleServer.patch diff --git a/nms-patches/BossBattleServer.patch b/nms-patches/BossBattleServer.patch new file mode 100644 index 0000000000..1a18af714d --- /dev/null +++ b/nms-patches/BossBattleServer.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/BossBattleServer.java ++++ b/net/minecraft/server/BossBattleServer.java +@@ -10,7 +10,7 @@ + + private final Set h = Sets.newHashSet(); + private final Set 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); diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java index 2f63796a81..6e6a5e3400 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java @@ -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);