(objectiveName, playerName, score)
| 53 | } |
| 54 | |
| 55 | function updatePlayerScore(objectiveName, playerName, score) { |
| 56 | /* |
| 57 | wph 20150801 - this fails with CanaryMod 1.8.2 so use command instead - messy for ops but non-ops won't see messages |
| 58 | |
| 59 | var sc = sb['getScore(String, ScoreObjective)']( playerName, sb.getScoreObjective( objectiveName) ); |
| 60 | sc.score = score; |
| 61 | */ |
| 62 | execCommand( |
| 63 | 'scoreboard players set ' + playerName + ' ' + objectiveName + ' ' + score |
| 64 | ); |
| 65 | } |
| 66 | |
| 67 | function removeTeamFromScoreboard(teamName) { |
| 68 | execCommand('scoreboard teams remove ' + teamName); |
no test coverage detected