Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
component:debug [2018/03/02 01:29]
kiritow [Player Object]
component:debug [2018/03/12 12:09]
kiritow Add scoreboard object manual
Line 35: Line 35:
 - `test():​userdata`  ​ - `test():​userdata`  ​
   Test method for user-data and general value conversion.   Test method for user-data and general value conversion.
 +- `getScoreboard():​userdata`  ​
 +  Get the scoreboard object for the world
 +- `sendToDebugCard(address:​string,​ data...)`  ​
 +  Sends data to the debug card with the specified address.
 +- `sendToClipboard(player:​string,​ text:​string)`  ​
 +  Sends text to the specified player'​s clipboard if possible.
  
 ==== World Object ==== ==== World Object ====
Line 121: Line 127:
 - `clearInventory()`  ​ - `clearInventory()`  ​
   Clear the players inventory   Clear the players inventory
 +
 +==== Scoreboard Object ====
 +
 +- `addObjective(objectiveName:​string,​ objectiveCriteria:​string)`  ​
 +  Create a new objective for the scoreboard
 +- `removeObjective(objectiveName:​string)`  ​
 +  Remove an objective from the scoreboard
 +- `increasePlayerScore(playerName:​string,​ objectiveName:​string,​ score:​int)`  ​
 +  Increases the score of a player for a certain objective
 +- `decreasePlayerScore(playerName:​string,​ objectiveName:​string,​ score:​int)`  ​
 +  Decrease the score of a player for a certain objective
 +- `addPlayerToTeam(player:​string,​ team:​string):​boolean`  ​
 +  Add a player to a team
 +- `removePlayerFromTeam(player:​string,​ team:​string):​boolean`  ​
 +  Remove a player from a specific team
 +- `removePlayerFromTeams(player:​string):​boolean`  ​
 +  Remove a player from their team
 +- `addTeam(team:​string)`  ​
 +  Add a team to the scoreboard
 +- `removeTeam(teamName:​ string)`  ​
 +  Remove a team from the scoreboard
 +- `getPlayerScore(playerName:​string,​ objectiveName:​string):​int`  ​
 +  Gets the score of a player for a certain objective
 +- `setPlayerScore(playerName:​string,​ objectiveName:​string,​ score:​int)`  ​
 +  Sets the score of a player for a certain objective
 +
 ---- ----
  
 {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}} {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}}