Initialize FTeamWrapper if it doesn't exist. Fixes #179

This commit is contained in:
eueln 2014-12-14 16:15:25 -06:00
parent 10fd3f082a
commit 6d2ca16002

View File

@ -8,7 +8,6 @@ import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;
import java.util.*;
import java.util.logging.Level;
public class FTeamWrapper {
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<Faction, FTeamWrapper>();
@ -94,12 +93,13 @@ public class FTeamWrapper {
if (!FScoreboard.isSupportedByServer()) {
return;
}
if (!wrappers.containsKey(faction)) {
P.p.log(Level.WARNING, "Something went wrong when updating the prefix for %s", faction.getTag());
return;
}
applyUpdates(faction);
} else {
wrappers.get(faction).updatePrefixes();
}
}
protected static void track(FScoreboard fboard) {
if (!FScoreboard.isSupportedByServer()) {