mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Critical bug fixan
This commit is contained in:
parent
16ca9c8aa7
commit
8208230e92
@ -12,6 +12,7 @@ import org.bukkit.event.Event;
|
|||||||
import org.bukkit.event.Event.Priority;
|
import org.bukkit.event.Event.Priority;
|
||||||
import org.getspout.spoutapi.SpoutManager;
|
import org.getspout.spoutapi.SpoutManager;
|
||||||
import org.getspout.spoutapi.gui.GenericTexture;
|
import org.getspout.spoutapi.gui.GenericTexture;
|
||||||
|
import org.getspout.spoutapi.gui.Widget;
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
import org.getspout.spoutapi.sound.SoundEffect;
|
||||||
import org.getspout.spoutapi.sound.SoundManager;
|
import org.getspout.spoutapi.sound.SoundManager;
|
||||||
@ -87,11 +88,22 @@ public class SpoutStuff
|
|||||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(x);
|
SpoutPlayer sPlayer = SpoutManager.getPlayer(x);
|
||||||
if(sPlayer.isSpoutCraftEnabled())
|
if(sPlayer.isSpoutCraftEnabled())
|
||||||
{
|
{
|
||||||
for(HealthBarMMO y : partyHealthBars.get(x))
|
ArrayList<Widget> widgets = new ArrayList<Widget>();
|
||||||
|
for(Widget w : sPlayer.getMainScreen().getAttachedWidgets())
|
||||||
{
|
{
|
||||||
sPlayer.getMainScreen().removeWidget(y.health_bar);
|
if(w instanceof HealthBarMMO)
|
||||||
sPlayer.getMainScreen().removeWidget(y.health_name);
|
{
|
||||||
|
widgets.add(w);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
for(Widget w : widgets)
|
||||||
|
{
|
||||||
|
sPlayer.getMainScreen().removeWidget(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
sPlayer.getMainScreen().setDirty(true);
|
||||||
|
partyHealthBars.get(x).clear();
|
||||||
|
|
||||||
initializePartyTracking(SpoutManager.getPlayer(x));
|
initializePartyTracking(SpoutManager.getPlayer(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user