New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scoreboard implementation #3953
base: master
Are you sure you want to change the base?
Changes from 22 commits
dbccb02
742d7f0
fbca038
aa07fc4
7c662df
f33477b
e781c4e
40aa1fb
9f19607
8df012d
8b275b5
099d8b1
06c646e
a5349bc
c43af6e
286f39e
b5dd7a7
e97eabb
451c0bc
84005d4
f9fbe3f
b0234d1
0ec602d
fdb586e
2f270a8
22dcb75
0cfb2cc
e0a6fe2
ea45d0f
f0f5c90
c1e7e18
f37345d
8b06240
804a507
ccb1f23
19b428b
950608a
9d4c9f0
dfd393e
bc0ab2d
209a87d
e0b4b3b
0112a66
cc3f200
22f4f18
99517e0
635dab5
5b62474
2b247be
6d7a76d
31ce44c
275b88d
5258f35
0203960
d8f069e
b627f05
a6a9275
4e81c75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9086,7 +9086,7 @@ a_Player:OpenWindow(Window); | |
cObjective = | ||
{ | ||
Desc = [[ | ||
This class represents a single scoreboard objective. | ||
This class represents a single scoreboard objective. Note that the term "player" is used loosely here to mean "item that the objective is tracking," to match the Vanilla minecraft documentation, but a "player" does not need to be the username of an actual player. | ||
]], | ||
Functions = | ||
{ | ||
|
@@ -9095,11 +9095,11 @@ a_Player:OpenWindow(Window); | |
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "player", | ||
Type = "string", | ||
}, | ||
{ | ||
Name = "number", | ||
Name = "ScoreToAdd", | ||
Type = "number", | ||
}, | ||
}, | ||
|
@@ -9132,12 +9132,22 @@ a_Player:OpenWindow(Window); | |
}, | ||
Notes = "Returns the internal name of the objective.", | ||
}, | ||
GetPlayers = | ||
{ | ||
Returns = | ||
{ | ||
{ | ||
Type = "table", | ||
}, | ||
}, | ||
Notes = "Returns all of the players this objective is tracking", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Players, as in |
||
}, | ||
GetScore = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "player", | ||
Type = "string", | ||
}, | ||
}, | ||
|
@@ -9170,18 +9180,29 @@ a_Player:OpenWindow(Window); | |
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "player", | ||
Type = "string", | ||
}, | ||
}, | ||
Notes = "Reset the score of the specified player.", | ||
}, | ||
SetAllScores = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "Score", | ||
Type = "number", | ||
}, | ||
}, | ||
Notes = "Sets the score of every player this objective tracks to the given score", | ||
}, | ||
SetDisplayName = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "DisplayName", | ||
Type = "string", | ||
}, | ||
}, | ||
|
@@ -9192,7 +9213,7 @@ a_Player:OpenWindow(Window); | |
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "player", | ||
Type = "string", | ||
}, | ||
{ | ||
|
@@ -9202,16 +9223,33 @@ a_Player:OpenWindow(Window); | |
}, | ||
Notes = "Sets the score of the specified player.", | ||
}, | ||
StringToType = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "TypeString", | ||
Type = "string", | ||
}, | ||
}, | ||
Returns = | ||
{ | ||
{ | ||
Type = "<unknown>", | ||
}, | ||
}, | ||
Notes = "(STATIC) Converts a Vanilla minecraft objective criteria string to an internal eType.", | ||
}, | ||
SubScore = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "string", | ||
Name = "player", | ||
Type = "string", | ||
}, | ||
{ | ||
Name = "number", | ||
Name = "ScoreToSubtract", | ||
Type = "number", | ||
}, | ||
}, | ||
|
@@ -9224,6 +9262,23 @@ a_Player:OpenWindow(Window); | |
}, | ||
Notes = "Subtracts a value from the score of the specified player and returns the new value.", | ||
}, | ||
TypeToString = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "Type", | ||
Type = "<unknown>", | ||
}, | ||
}, | ||
Returns = | ||
{ | ||
{ | ||
Type = "string", | ||
}, | ||
}, | ||
Notes = "(STATIC) Converts an internal objective eType to a Vanilla minecraft objective criteria string", | ||
}, | ||
}, | ||
Constants = | ||
{ | ||
|
@@ -11551,7 +11606,7 @@ end | |
}, | ||
{ | ||
Name = "Value", | ||
Type = "<unknown>", | ||
Type = "number", | ||
}, | ||
}, | ||
Notes = "Adds a value to all player scores of the specified objective type.", | ||
|
@@ -11793,6 +11848,10 @@ end | |
{ | ||
Notes = "", | ||
}, | ||
dsSidebarTeamOffset = | ||
{ | ||
Notes = "Add this to the team color (see cTeam::GetColor()) to get the appropriate display slot ID for the sidebar of that team. Note that the team must have been assigned a valid color using SetColor().", | ||
}, | ||
}, | ||
}, | ||
cServer = | ||
|
@@ -12072,6 +12131,16 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress") | |
}, | ||
Notes = "Returns whether players can see invisible teammates.", | ||
}, | ||
GetColor = | ||
{ | ||
Returns = | ||
{ | ||
{ | ||
Type = "number", | ||
}, | ||
}, | ||
Notes = "Returns the color ID of the team", | ||
}, | ||
GetDisplayName = | ||
{ | ||
Returns = | ||
|
@@ -12171,6 +12240,17 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress") | |
}, | ||
Notes = "Set whether players can see invisible teammates.", | ||
}, | ||
SetColor = | ||
{ | ||
Params = | ||
{ | ||
{ | ||
Name = "Color", | ||
Type = "number", | ||
}, | ||
}, | ||
Notes = "Sets the color ID of the team (0 to 15)", | ||
}, | ||
SetDisplayName = | ||
{ | ||
Params = | ||
|
@@ -12216,6 +12296,77 @@ local CompressedString = cStringCompression.CompressStringGZIP("DataToCompress") | |
Notes = "Sets the suffix appended to the names of the members of this team.", | ||
}, | ||
}, | ||
Constants = | ||
{ | ||
teamInvalid = | ||
{ | ||
Notes = "Placeholder for teams which are not associated with a color.", | ||
}, | ||
teamBlack = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkBlue = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkGreen = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkAqua = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkRed = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkPurple = | ||
{ | ||
Notes = "", | ||
}, | ||
teamGold = | ||
{ | ||
Notes = "", | ||
}, | ||
teamGray = | ||
{ | ||
Notes = "", | ||
}, | ||
teamDarkGray = | ||
{ | ||
Notes = "", | ||
}, | ||
teamBlue = | ||
{ | ||
Notes = "", | ||
}, | ||
teamGreen = | ||
{ | ||
Notes = "", | ||
}, | ||
teamAqua = | ||
{ | ||
Notes = "", | ||
}, | ||
teamRed = | ||
{ | ||
Notes = "", | ||
}, | ||
teamLightPurple = | ||
{ | ||
Notes = "", | ||
}, | ||
teamYellow = | ||
{ | ||
Notes = "", | ||
}, | ||
teamWhite = | ||
{ | ||
Notes = "", | ||
}, | ||
}, | ||
}, | ||
cTNTEntity = | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,8 @@ class cProtocol | |
virtual void SendSpawnVehicle (const cEntity & a_Vehicle, char a_VehicleType, char a_VehicleSubType) = 0; | ||
virtual void SendStatistics (const cStatManager & a_Manager) = 0; | ||
virtual void SendTabCompletionResults (const AStringVector & a_Results) = 0; | ||
virtual void SendTeam (const cTeam & a_Team, Byte a_Mode) = 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use the |
||
virtual void SendTeamChangeMembership (const AString & a_TeamName, bool a_IsAdding, const std::set<AString> & a_Delta) = 0; | ||
virtual void SendTeleportEntity (const cEntity & a_Entity) = 0; | ||
virtual void SendThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) = 0; | ||
virtual void SendTitleTimes (int a_FadeInTicks, int a_DisplayTicks, int a_FadeOutTicks) = 0; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name or UUID or
cPlayer
? Use a descriptive param name:playerName
,playerUuid