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













2















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?










share|improve this question
















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 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















2















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?










share|improve this question
















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 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













2












2








2








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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

















  • 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
















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










1 Answer
1






active

oldest

votes


















0














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 an hasOcelot score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score for hasOcelot 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.







share|improve this answer




















  • 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











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
);



);













draft saved

draft discarded


















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









0














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 an hasOcelot score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score for hasOcelot 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.







share|improve this answer




















  • 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
















0














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 an hasOcelot score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score for hasOcelot 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.







share|improve this answer




















  • 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














0












0








0







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 an hasOcelot score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score for hasOcelot 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.







share|improve this answer















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 an hasOcelot score of 0 presses the button, spawn an Ocelot.
Give the current player who pressed the button a score for hasOcelot 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.








share|improve this answer














share|improve this answer



share|improve this answer








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













  • 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


















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How does Billy Russo acquire his 'Jigsaw' mask? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why does Bane wear the mask?Why does Kylo Ren wear a mask?Why did Captain America remove his mask while fighting Batroc the Leaper?How did the OA acquire her wisdom?Is Billy Breckenridge gay?How does Adrian Toomes hide his earnings from the IRS?What is the state of affairs on Nootka Sound by the end of season 1?How did Tia Dalma acquire Captain Barbossa's body?How is one “Deemed Worthy”, to acquire the Greatsword “Dawn”?How did Karen acquire the handgun?

Личност Атрибути на личността | Литература и източници | НавигацияРаждането на личносттаредактиратередактирате

A sequel to Domino's tragic life Why Christmas is for Friends Cold comfort at Charles' padSad farewell for Lady JanePS Most watched News videos