Fix wither and dead bodies bug

This commit is contained in:
libraryaddict 2015-11-03 14:41:34 +13:00
parent 3f66e11b3d
commit 7496ed763a
2 changed files with 7 additions and 2 deletions

View File

@ -1637,7 +1637,12 @@ public abstract class Game implements Listener
try try
{ {
Team team = Scoreboard.GetScoreboard().registerNewTeam(name); Team team = Scoreboard.GetScoreboard().getTeam(ChatColor.COLOR_CHAR + "DeadBody");
if (team == null)
{
team = Scoreboard.GetScoreboard().registerNewTeam(ChatColor.COLOR_CHAR + "DeadBody");
}
team.setNameTagVisibility(NameTagVisibility.NEVER); team.setNameTagVisibility(NameTagVisibility.NEVER);
team.addEntry(name); team.addEntry(name);

View File

@ -332,7 +332,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer
{ {
return; return;
} }
if(!GetKit(event.getPlayer()).GetName().contentEquals("Human Editor")) if(GetKit(event.getPlayer()) != null && !GetKit(event.getPlayer()).GetName().contentEquals("Human Editor"))
{ {
event.setCancelled(true); event.setCancelled(true);
return; return;