mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-27 12:46:09 +01:00
Check if FTeamWrapper exists for faction. Fixes #107
This commit is contained in:
parent
289a4edc93
commit
11ae51a6ca
@ -8,6 +8,7 @@ import org.bukkit.scoreboard.Scoreboard;
|
|||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class FTeamWrapper {
|
public class FTeamWrapper {
|
||||||
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<Faction, FTeamWrapper>();
|
private static final Map<Faction, FTeamWrapper> wrappers = new HashMap<Faction, FTeamWrapper>();
|
||||||
@ -75,6 +76,10 @@ public class FTeamWrapper {
|
|||||||
if (!FScoreboard.isSupportedByServer()) {
|
if (!FScoreboard.isSupportedByServer()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(!wrappers.containsKey(faction)) {
|
||||||
|
P.p.log(Level.WARNING, "Something went wrong when updating the prefix for %s", faction.getTag());
|
||||||
|
return;
|
||||||
|
}
|
||||||
wrappers.get(faction).updatePrefixes();
|
wrappers.get(faction).updatePrefixes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user