Minecraft command block: allow user on server to spawn one animal (per user)How can I only allow a player to spawn once on a Minecraft server?Minecraft Command Blocks Help - Selecting previous target in a second command blockRandom spawn for multiplayer Minecraft serverMinecraft Tree Tipper Command Block ErrorSummon armorstands recursively from an origin with only one armorstand per blockMinecraft : Command block - Tp areaKill all armor stands within a block except one MinecraftHow to check that a specific type of entity is not around?Command block not telling the right player - Minecraft
How do researchers send unsolicited emails asking for feedback on their works?
What happens when the centripetal force is equal and opposite to the centrifugal force?
Can "few" be used as a subject? If so, what is the rule?
Would mining huge amounts of resources on the Moon change its orbit?
Does convergence of polynomials imply that of its coefficients?
What (if any) is the reason to buy in small local stores?
Print last inputted byte
How do you justify more code being written by following clean code practices?
Turning a hard to access nut?
Why do I have a large white artefact on the rendered image?
What will the Frenchman say?
Imaginary part of expression too difficult to calculate
How to determine the greatest d orbital splitting?
Why is this tree refusing to shed its dead leaves?
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Air travel with refrigerated insulin
Single word to change groups
Do people actually use the word "kaputt" in conversation?
Hot air balloons as primitive bombers
Worshiping one God at a time?
Unable to get newly inserted Product's Id using After Plugin for Catalog Product save controller method
Could any one tell what PN is this Chip? Thanks~
Why is "la Gestapo" feminine?
Did Nintendo change its mind about 68000 SNES?
Minecraft command block: allow user on server to spawn one animal (per user)
How can I only allow a player to spawn once on a Minecraft server?Minecraft Command Blocks Help - Selecting previous target in a second command blockRandom spawn for multiplayer Minecraft serverMinecraft Tree Tipper Command Block ErrorSummon armorstands recursively from an origin with only one armorstand per blockMinecraft : Command block - Tp areaKill all armor stands within a block except one MinecraftHow to check that a specific type of entity is not around?Command block not telling the right player - Minecraft
I'd like to create a quest where a user can activate a command block that will spawn one ocelot, but limit it so that each player can activate said command only once.
I've got the command to spawn one ocelot, which is:
/summon ocelot ~ ~1 ~ PersistenceRequired:1
but I don't know how to limit it so that each player can only do it only once. I found the solution to something similar, but I don't know how to integrate that into spawning animals rather than giving items.
TL;DR: How would I use a command block to allow each player to summon an ocelot only once?
minecraft minecraft-commands
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I'd like to create a quest where a user can activate a command block that will spawn one ocelot, but limit it so that each player can activate said command only once.
I've got the command to spawn one ocelot, which is:
/summon ocelot ~ ~1 ~ PersistenceRequired:1
but I don't know how to limit it so that each player can only do it only once. I found the solution to something similar, but I don't know how to integrate that into spawning animals rather than giving items.
TL;DR: How would I use a command block to allow each player to summon an ocelot only once?
minecraft minecraft-commands
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Without reviewing the research you've done, what I can say is you want totag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.
– MBraedley
Feb 15 at 21:05
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
What exactly is your question here? How to replace/give
with/summon
? Just… do it. Just replace it. I don't understand the problem.
– Fabian Röling
Feb 15 at 21:53
@FabianRöling that won't work because you don't/summon
a player. The player argument is no longer included in the/summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.
– Takaia
Feb 16 at 23:57
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28
add a comment |
I'd like to create a quest where a user can activate a command block that will spawn one ocelot, but limit it so that each player can activate said command only once.
I've got the command to spawn one ocelot, which is:
/summon ocelot ~ ~1 ~ PersistenceRequired:1
but I don't know how to limit it so that each player can only do it only once. I found the solution to something similar, but I don't know how to integrate that into spawning animals rather than giving items.
TL;DR: How would I use a command block to allow each player to summon an ocelot only once?
minecraft minecraft-commands
I'd like to create a quest where a user can activate a command block that will spawn one ocelot, but limit it so that each player can activate said command only once.
I've got the command to spawn one ocelot, which is:
/summon ocelot ~ ~1 ~ PersistenceRequired:1
but I don't know how to limit it so that each player can only do it only once. I found the solution to something similar, but I don't know how to integrate that into spawning animals rather than giving items.
TL;DR: How would I use a command block to allow each player to summon an ocelot only once?
minecraft minecraft-commands
minecraft minecraft-commands
edited Feb 17 at 1:00
Takaia
asked Feb 15 at 20:01
TakaiaTakaia
143
143
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Without reviewing the research you've done, what I can say is you want totag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.
– MBraedley
Feb 15 at 21:05
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
What exactly is your question here? How to replace/give
with/summon
? Just… do it. Just replace it. I don't understand the problem.
– Fabian Röling
Feb 15 at 21:53
@FabianRöling that won't work because you don't/summon
a player. The player argument is no longer included in the/summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.
– Takaia
Feb 16 at 23:57
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28
add a comment |
Without reviewing the research you've done, what I can say is you want totag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.
– MBraedley
Feb 15 at 21:05
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
What exactly is your question here? How to replace/give
with/summon
? Just… do it. Just replace it. I don't understand the problem.
– Fabian Röling
Feb 15 at 21:53
@FabianRöling that won't work because you don't/summon
a player. The player argument is no longer included in the/summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.
– Takaia
Feb 16 at 23:57
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28
Without reviewing the research you've done, what I can say is you want to
tag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.– MBraedley
Feb 15 at 21:05
Without reviewing the research you've done, what I can say is you want to
tag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.– MBraedley
Feb 15 at 21:05
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
What exactly is your question here? How to replace
/give
with /summon
? Just… do it. Just replace it. I don't understand the problem.– Fabian Röling
Feb 15 at 21:53
What exactly is your question here? How to replace
/give
with /summon
? Just… do it. Just replace it. I don't understand the problem.– Fabian Röling
Feb 15 at 21:53
@FabianRöling that won't work because you don't
/summon
a player. The player argument is no longer included in the /summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.– Takaia
Feb 16 at 23:57
@FabianRöling that won't work because you don't
/summon
a player. The player argument is no longer included in the /summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.– Takaia
Feb 16 at 23:57
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28
add a comment |
1 Answer
1
active
oldest
votes
Scoreboards!
You can track a user with scoreboards. The main gist is:
If a user has an
hasOcelot
score of 1 presses the button, do nothing.
If a user has anhasOcelot
score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score forhasOcelot
of 1.
Where hasOcelot
is a score of type 'dummy' that you use to keep tabs on who has spawned an Ocelot and who hasn't.
You can use the /testfor
command with the radius and score selectors to see if the player fits into the criteria.
tl;dr
Chain command blocks like this:
/testfor @p[r=2,score_hasOcelot_max=0]
(Check if user hasn't spawned)/summon ~ ~1 ~ minecraft:Ocelot
(Summon if the previous/testfor
was true)/scoreboards players set @p[r=2,score_hasOcelot_max=0] hasOcelot 1
(mark him as having an ocelot spawned, continuation of chain)
Note: I might've messed up some selectors due to changes between 1.9 and now.
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.
– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "41"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f346577%2fminecraft-command-block-allow-user-on-server-to-spawn-one-animal-per-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Scoreboards!
You can track a user with scoreboards. The main gist is:
If a user has an
hasOcelot
score of 1 presses the button, do nothing.
If a user has anhasOcelot
score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score forhasOcelot
of 1.
Where hasOcelot
is a score of type 'dummy' that you use to keep tabs on who has spawned an Ocelot and who hasn't.
You can use the /testfor
command with the radius and score selectors to see if the player fits into the criteria.
tl;dr
Chain command blocks like this:
/testfor @p[r=2,score_hasOcelot_max=0]
(Check if user hasn't spawned)/summon ~ ~1 ~ minecraft:Ocelot
(Summon if the previous/testfor
was true)/scoreboards players set @p[r=2,score_hasOcelot_max=0] hasOcelot 1
(mark him as having an ocelot spawned, continuation of chain)
Note: I might've messed up some selectors due to changes between 1.9 and now.
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.
– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
add a comment |
Scoreboards!
You can track a user with scoreboards. The main gist is:
If a user has an
hasOcelot
score of 1 presses the button, do nothing.
If a user has anhasOcelot
score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score forhasOcelot
of 1.
Where hasOcelot
is a score of type 'dummy' that you use to keep tabs on who has spawned an Ocelot and who hasn't.
You can use the /testfor
command with the radius and score selectors to see if the player fits into the criteria.
tl;dr
Chain command blocks like this:
/testfor @p[r=2,score_hasOcelot_max=0]
(Check if user hasn't spawned)/summon ~ ~1 ~ minecraft:Ocelot
(Summon if the previous/testfor
was true)/scoreboards players set @p[r=2,score_hasOcelot_max=0] hasOcelot 1
(mark him as having an ocelot spawned, continuation of chain)
Note: I might've messed up some selectors due to changes between 1.9 and now.
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.
– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
add a comment |
Scoreboards!
You can track a user with scoreboards. The main gist is:
If a user has an
hasOcelot
score of 1 presses the button, do nothing.
If a user has anhasOcelot
score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score forhasOcelot
of 1.
Where hasOcelot
is a score of type 'dummy' that you use to keep tabs on who has spawned an Ocelot and who hasn't.
You can use the /testfor
command with the radius and score selectors to see if the player fits into the criteria.
tl;dr
Chain command blocks like this:
/testfor @p[r=2,score_hasOcelot_max=0]
(Check if user hasn't spawned)/summon ~ ~1 ~ minecraft:Ocelot
(Summon if the previous/testfor
was true)/scoreboards players set @p[r=2,score_hasOcelot_max=0] hasOcelot 1
(mark him as having an ocelot spawned, continuation of chain)
Note: I might've messed up some selectors due to changes between 1.9 and now.
Scoreboards!
You can track a user with scoreboards. The main gist is:
If a user has an
hasOcelot
score of 1 presses the button, do nothing.
If a user has anhasOcelot
score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score forhasOcelot
of 1.
Where hasOcelot
is a score of type 'dummy' that you use to keep tabs on who has spawned an Ocelot and who hasn't.
You can use the /testfor
command with the radius and score selectors to see if the player fits into the criteria.
tl;dr
Chain command blocks like this:
/testfor @p[r=2,score_hasOcelot_max=0]
(Check if user hasn't spawned)/summon ~ ~1 ~ minecraft:Ocelot
(Summon if the previous/testfor
was true)/scoreboards players set @p[r=2,score_hasOcelot_max=0] hasOcelot 1
(mark him as having an ocelot spawned, continuation of chain)
Note: I might've messed up some selectors due to changes between 1.9 and now.
edited Feb 17 at 1:17
answered Feb 17 at 1:11
aytimothyaytimothy
11.6k1259109
11.6k1259109
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.
– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
add a comment |
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.
– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
1
1
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.– MBraedley
Feb 24 at 16:44
testfor
was removed in 1.13. Also, this probably won't work in a function file because it relies on conditional execution. Not a deal breaker, but generally makes life easier. And the selectors are wrong for 1.13.– MBraedley
Feb 24 at 16:44
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
@MBraedley I haven't used commands in 1.13 yet, so if you have a better answer, by all means change it... Or post your own.
– aytimothy
Feb 25 at 9:33
add a comment |
Thanks for contributing an answer to Arqade!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f346577%2fminecraft-command-block-allow-user-on-server-to-spawn-one-animal-per-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Without reviewing the research you've done, what I can say is you want to
tag
players that have spawned an animal, and then use that tag to prevent them from doing the same in the future. Note that this can be bypassed by ops.– MBraedley
Feb 15 at 21:05
Hey, look, an XY problem! Try asking about why ocelots don't spawn instead and give more details for that (in a new question).
– Fabian Röling
Feb 15 at 21:51
What exactly is your question here? How to replace
/give
with/summon
? Just… do it. Just replace it. I don't understand the problem.– Fabian Röling
Feb 15 at 21:53
@FabianRöling that won't work because you don't
/summon
a player. The player argument is no longer included in the/summon
command, but it needs to be included in order for it to only allow one command per player. Unless I'm looking at it wrong.– Takaia
Feb 16 at 23:57
"The player argument is no longer included in the /summon command" What? What would that even do? Summoning a player?
– Fabian Röling
Feb 17 at 1:28