Yeah, true, if it's in multiplayer, there are two possibilities :
1) Remove the block. If another player place it, it will give him the item. (To see who place the block, we can have an objectives that store how many of the block have been placed, and when it change, it's this guy who placed on the monument)
2) Only one player can place the block. To do that, if your players are in adventure mod and cannot break the block, you have nothing to change (Only what I said if you want to know exactly who placed the block). If your players are not in adventure mod, then you can create an objective that you set to 1 to a ghost player and say "if the ghost hasn't the score, then you give the item"
But you can use another method, which is quite complicated.
You need to use trigger functions. Create just one called "market", that will execute a tellraw to the one who called it.
In that tellraw, you put things like :
Fill function -> 10$ [BUY]
and you create a click event on [BUY]. Then you just have to run a function associate to it as him.
I recommand you to use datapack to do that, it will be simplier if you want your players to have access to /fill for exemple, because they will not have access to the command but to a substitute you will code. If you need help, don't hesitate to post here, I'll answer.
I recommand you to not use redstone, it can be laggy, it's no good, create a timer with only command block !
scoreboard objectives add timer dummy
scoreboard objectives add second dummy
scoreboard players add @a time 1
scoreboard players add @a[scores={time=20}] second 1
scoreboard players set @a[scores={time=20}] time 0
The first two ones only has to be executed one time, the third and fourth command has to be set in repeat unconditional always active and the last in chain conditional always active.
And for telling players when someone is dead, why do you have to create a clock ? A command block can be put in repeat mode, and execute your fonction every tick ! With that in mind, you just have to create the death objective like you did, and tell players when someone die, then reset his scores.
scoreboard objectives add death deathCount
execute as @a[scores={death=1}] run tellraw @a [{"selector":"@s","color":"red"},{"text":" has died, surviving for ","color":"gold"},{"score":{"name":"@s","objective":"second"},"color":"aqua"},{"text":" seconds.","color":"gold"}]
scoreboard players set @a[scores={death=1}] second 0
scoreboard players set @a[scores={death=1}] death 0
The first command block in repeat always active unconditional
scoreboard objectives add time dummy
scoreboard objectives add health health
scoreboard objectives add deathCount deathCount
scoreboard players add #time time 1
execute if score #time time matches 100 run scoreboard objectives setdisplay sidebar health
execute if score #time time matches 200 run scoreboard objectives setdisplay sidebar deathCount
execute if score #time time matches 200 run scoreboard players set #time time 0
Your problem here is that you put ".." in an nbt tag, which want the exact number.
You can just save how many log the player has and stock it in a score, like this :
execute as @p store result score @s nb_log run clear @s oak_log 0
execute as @p if score @s nb_log matches 4.. run xp add @s 1 levels
execute as @p if score @s nb_log matches 4.. run tellraw @s {"text":"Thank you, I have rewarded you for your hardwork!","color":"green"}
execute as @p if score @s nb_log matches 4.. run playsound minecraft:block.note_block.pling ambient @s ~ ~ ~ 5 2
clear @p minecraft:oak_log 4
You can just put two command block, one who set a score if your condition is correct, and the other which tell if a player got score equal 1, you spawn the redstone block.
You have to tell it where you want the command to run. Here you just say "it's the snowball that execute the command" but it will not run where it is. So instead of "as @e", write "at @e"
execute at @e[type=minecraft:snowball] run fill ~2 ~2 ~2 ~-2 ~-2 ~-2 minecraft:air replace minecraft:end_stone
0
Yeah, true, if it's in multiplayer, there are two possibilities :
1) Remove the block. If another player place it, it will give him the item. (To see who place the block, we can have an objectives that store how many of the block have been placed, and when it change, it's this guy who placed on the monument)
2) Only one player can place the block. To do that, if your players are in adventure mod and cannot break the block, you have nothing to change (Only what I said if you want to know exactly who placed the block). If your players are not in adventure mod, then you can create an objective that you set to 1 to a ghost player and say "if the ghost hasn't the score, then you give the item"
0
No, you can't
But you can use another method, which is quite complicated.
You need to use trigger functions. Create just one called "market", that will execute a tellraw to the one who called it.
In that tellraw, you put things like :
Fill function -> 10$ [BUY]
and you create a click event on [BUY]. Then you just have to run a function associate to it as him.
I recommand you to use datapack to do that, it will be simplier if you want your players to have access to /fill for exemple, because they will not have access to the command but to a substitute you will code. If you need help, don't hesitate to post here, I'll answer.
0
Hello !
I recommand you to not use redstone, it can be laggy, it's no good, create a timer with only command block !
The first two ones only has to be executed one time, the third and fourth command has to be set in repeat unconditional always active and the last in chain conditional always active.
And for telling players when someone is dead, why do you have to create a clock ? A command block can be put in repeat mode, and execute your fonction every tick ! With that in mind, you just have to create the death objective like you did, and tell players when someone die, then reset his scores.
The first command block in repeat always active unconditional
The second one in chain conditional always active
the third in chain conditional always active
0
hexa, you can just give the player a tag :
the first command in a repeat unconditional always active command block and the second in a chain conditional always active command block
With that, you can even remove the tag when he does an action to reset all.
0
You can alternate between objectives, like that :
0
Your problem here is that you put ".." in an nbt tag, which want the exact number.
You can just save how many log the player has and stock it in a score, like this :
1
You have to modify what she have in his hand. Use that code in command block repeat :
0
maybe if you spawn a mob with noAI, and you gave it a motion, then you spawn particles all tick on it ? I'll go try it.
1
In "execute if", you cant put >= [number], for that, you have to do that :
1
You can just put two command block, one who set a score if your condition is correct, and the other which tell if a player got score equal 1, you spawn the redstone block.
0
You have to tell it where you want the command to run. Here you just say "it's the snowball that execute the command" but it will not run where it is. So instead of "as @e", write "at @e"
0
This line isn't correct, @r is for a random player. Change this line with :
0
0
[Edit because I'm dumb]
1
You have to use
With this, the function run at the player's coordinates