MCPcopy
hub / github.com/walterhiggins/ScriptCraft / updatePlayerScore

Function updatePlayerScore

src/main/js/modules/minigames/scoreboard.js:55–65  ·  view source on GitHub ↗
(objectiveName, playerName, score)

Source from the content-addressed store, hash-verified

53}
54
55function 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
67function removeTeamFromScoreboard(teamName) {
68 execCommand('scoreboard teams remove ' + teamName);

Callers 1

addPlayerToTeamFunction · 0.85

Calls 1

execCommandFunction · 0.85

Tested by

no test coverage detected