From 7496ed763abcb18e9a9210041db0d3345a79b5ce Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 3 Nov 2015 14:41:34 +1300 Subject: [PATCH] Fix wither and dead bodies bug --- .../src/nautilus/game/arcade/game/Game.java | 7 ++++++- .../nautilus/game/arcade/game/games/wither/WitherGame.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java index 95f34f023..e20b1cf79 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/Game.java @@ -1637,7 +1637,12 @@ public abstract class Game implements Listener 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.addEntry(name); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java index eb3555a6b..ef4cab48f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/wither/WitherGame.java @@ -332,7 +332,7 @@ public class WitherGame extends TeamGame implements IBlockRestorer { return; } - if(!GetKit(event.getPlayer()).GetName().contentEquals("Human Editor")) + if(GetKit(event.getPlayer()) != null && !GetKit(event.getPlayer()).GetName().contentEquals("Human Editor")) { event.setCancelled(true); return;