Hello, i currently track a variety of scoreboards like time played and diamonds mined etc for my minecraft server. The issue is how easily these statistics are cheated by using a silktouch pickaxe and standing afk. Ideally we would want to fix this by only increasing the scoreboard when certain conditions are met. Like the player doesn't have a silk touch pickaxe in his hand.
How would we got at this? We can track what the player has in his hand relatively easy but i'm not sure how to stop the scoreboard from increasing when mining the ore with it.
A similar issue occurs with playtime in which we already figured out how to track if a player is afk, but i'm not sure how to stop increasing the playtime statistic when the player is afk.
I would create another objective which tracks the number of diamond ores broken and when that objective is 1 or more, decrease the original objective by 1 and reset the second objective.
I thought about that, sadly i can't figure out a way to make that work.
You already count the number of diamonds ore broken in the first objective. Creating another one of those wouldnt work since this second scoreboard still cannot track if the ore is mined with a silk touch pickaxe. Because of this the scoreboard would essentially be equal and creating a second one would have no effect. Since you cannot use it to decrease the first one because that would just pause the scoreboard because they will always increase at the same time.
The only way i can think of is tracking when a diamond is mined with an execute command, however i'm not sure if this is possible. And if it is possible how to achieve this.
No, the second objective acts as a temporary resettable indicator of when a player has mined the ore and the original objective stores the total amount or ore mined. Example:
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Ohh thats really elegant actually, never thought of having the nbt:Selecteditem within the /scoreboard remove command. That fixes that issue in it's entirety. Thanks a lot!
Hello, i currently track a variety of scoreboards like time played and diamonds mined etc for my minecraft server. The issue is how easily these statistics are cheated by using a silktouch pickaxe and standing afk. Ideally we would want to fix this by only increasing the scoreboard when certain conditions are met. Like the player doesn't have a silk touch pickaxe in his hand.
How would we got at this? We can track what the player has in his hand relatively easy but i'm not sure how to stop the scoreboard from increasing when mining the ore with it.
A similar issue occurs with playtime in which we already figured out how to track if a player is afk, but i'm not sure how to stop increasing the playtime statistic when the player is afk.
Any help with this would be greatly appreciated!
I would create another objective which tracks the number of diamond ores broken and when that objective is 1 or more, decrease the original objective by 1 and reset the second objective.
Command block engineer // Developer // #TeamTrees
I thought about that, sadly i can't figure out a way to make that work.
You already count the number of diamonds ore broken in the first objective. Creating another one of those wouldnt work since this second scoreboard still cannot track if the ore is mined with a silk touch pickaxe. Because of this the scoreboard would essentially be equal and creating a second one would have no effect. Since you cannot use it to decrease the first one because that would just pause the scoreboard because they will always increase at the same time.
The only way i can think of is tracking when a diamond is mined with an execute command, however i'm not sure if this is possible. And if it is possible how to achieve this.
No, the second objective acts as a temporary resettable indicator of when a player has mined the ore and the original objective stores the total amount or ore mined. Example:
Command block engineer // Developer // #TeamTrees
Nothing to say, but what about plugins?
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Ohh thats really elegant actually, never thought of having the nbt:Selecteditem within the /scoreboard remove command. That fixes that issue in it's entirety. Thanks a lot!