Hologram fixes
This commit is contained in:
parent
e969e1adeb
commit
cef52368a3
@ -350,7 +350,7 @@ public class Hologram
|
||||
*/
|
||||
public Hologram removePlayer(Player player)
|
||||
{
|
||||
return addPlayer(player.getName());
|
||||
return removePlayer(player.getName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -231,10 +231,30 @@ public class Minion implements Listener
|
||||
|
||||
private void disguiseCreeper()
|
||||
{
|
||||
if(_hologram != null)
|
||||
if (_hologram != null)
|
||||
{
|
||||
_hologram.setText(_team.GetColor() + _name);
|
||||
_hologram.setText(_team.GetColor() + _name);
|
||||
}
|
||||
else
|
||||
{
|
||||
_hologram = new Hologram(_manager.getHologramManager(), _entity
|
||||
.getLocation().add(0, 2.3, 0), _team.GetColor() + _name);
|
||||
_hologram.setHologramTarget(Hologram.HologramTarget.WHITELIST);
|
||||
_hologram.setFollowEntity(_entity);
|
||||
|
||||
for (Player player : _manager.GetGame().GetPlayers(false))
|
||||
{
|
||||
if (_manager.GetGame().GetTeam(player) == _team)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
_hologram.addPlayer(player);
|
||||
}
|
||||
|
||||
_hologram.start();
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Object disguise = _type.getDisguiseClass().getConstructors()[0].newInstance(_entity);
|
||||
@ -250,8 +270,6 @@ public class Minion implements Listener
|
||||
_manager.GetDisguise().disguise((DisguiseBase)disguise);
|
||||
}
|
||||
catch (Exception e) {}
|
||||
_hologram = new Hologram(_manager.getHologramManager(), _entity.getLocation().add(0, 2, 0), _team.GetColor() + _name);
|
||||
_hologram.setHologramTarget(Hologram.HologramTarget.WHITELIST);
|
||||
}
|
||||
|
||||
private void path()
|
||||
@ -277,18 +295,6 @@ public class Minion implements Listener
|
||||
_killed = killed;
|
||||
_player = player;
|
||||
_die = true;
|
||||
for(Player players : UtilServer.getPlayers())
|
||||
{
|
||||
try
|
||||
{
|
||||
_hologram.removePlayer(players);
|
||||
_hologram.setLocation(new Location(_entity.getWorld(), 0, 0, 0));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
_hologram.stop();
|
||||
try
|
||||
{
|
||||
|
@ -320,8 +320,6 @@ public class TypeWars extends TeamGame
|
||||
Hologram hologram = minion.getHologram();
|
||||
double yAdd = UtilPlayer.is1_8(player) ? 2.18 : 2.3;
|
||||
hologram.setLocation(minion.getEntity().getLocation().add(0, minion.getType().getTagHight() + yAdd, 0));
|
||||
hologram.addPlayer(player);
|
||||
hologram.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user