| 1177 | } |
| 1178 | |
| 1179 | @Override |
| 1180 | public ScoreboardImpl getScoreboard() { |
| 1181 | if (getWorld() == null) { |
| 1182 | return null; |
| 1183 | } |
| 1184 | bbn scoreboard = getWorld().ad(); |
| 1185 | if (scoreboard == null) { |
| 1186 | return null; |
| 1187 | } |
| 1188 | bbj objective = scoreboard.a(1); |
| 1189 | if (objective == null) { |
| 1190 | return null; |
| 1191 | } |
| 1192 | String displayName = objective.d(); |
| 1193 | Collection<bbl> scores = scoreboard.i(objective); |
| 1194 | HashMap<String, Integer> lines = Maps.newHashMap(); |
| 1195 | for (bbl score : scores) { |
| 1196 | lines.put(score.e(), score.c()); |
| 1197 | } |
| 1198 | return new ScoreboardImpl(displayName, lines); |
| 1199 | } |
| 1200 | |
| 1201 | @Override |
| 1202 | public ResourceManager getResourceManager() { |