| 1226 | } |
| 1227 | |
| 1228 | @Override |
| 1229 | public ScoreboardImpl getScoreboard() { |
| 1230 | if (getWorld() == null) { |
| 1231 | return null; |
| 1232 | } |
| 1233 | bhk scoreboard = getWorld().af(); |
| 1234 | if (scoreboard == null) { |
| 1235 | return null; |
| 1236 | } |
| 1237 | bhg objective = scoreboard.a(1); |
| 1238 | if (objective == null) { |
| 1239 | return null; |
| 1240 | } |
| 1241 | String displayName = objective.d(); |
| 1242 | Collection<bhi> scores = scoreboard.i(objective); |
| 1243 | HashMap<String, Integer> lines = Maps.newHashMap(); |
| 1244 | for (bhi score : scores) { |
| 1245 | lines.put(score.e(), score.c()); |
| 1246 | } |
| 1247 | return new ScoreboardImpl(displayName, lines); |
| 1248 | } |
| 1249 | |
| 1250 | @Override |
| 1251 | public ResourceManager getResourceManager() { |