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

Function addPlayerToTeam

src/main/js/modules/minigames/scoreboard.js:47–53  ·  view source on GitHub ↗
(objectiveName, teamName, playerName)

Source from the content-addressed store, hash-verified

45 sb['removeScoreObjective(String)'](name);
46}
47function addPlayerToTeam(objectiveName, teamName, playerName) {
48 execCommand('scoreboard teams join ' + teamName + ' ' + playerName);
49 execCommand(
50 'scoreboard players set ' + playerName + ' ' + objectiveName + ' -1'
51 );
52 updatePlayerScore(objectiveName, playerName, 0);
53}
54
55function updatePlayerScore(objectiveName, playerName, score) {
56 /*

Callers

nothing calls this directly

Calls 2

execCommandFunction · 0.85
updatePlayerScoreFunction · 0.85

Tested by

no test coverage detected