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 blockMinecraft 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 - MinecraftI can't have more than one working command block in my Minecraft worldHow to make a command block summon an end crystal on top of said command block in minecraft 1.14.1

What are the arguments for California’s nonpartisan blanket (jungle) primaries?

Is it rude to refer to janitors as 'floor people'?

Is the Malay "garam" (salt) related to the Latin "garum" (fish sauce)?

Why alcohol had been selected as fuel for the first American space rockets?

Why did Spider-Man take a detour to Dorset?

Getting one over on the boss

Alternator dying so junk car?

What are "full piece" and "half piece" in chess?

How can I find what program is preventing my Mac from going to sleep?

Is there a standard way of referencing line numbers in a draft?

Why did Steve Rogers choose this character in Endgame?

Can a Resident Assistant Be Told to Ignore a Lawful Order?

Trivial cases of shared_ptr and weak_ptr failing

Alphanumeric Line and Curve Counting

Why isn't aluminium involved in biological processes?

What details should I consider before agreeing for part of my salary to be 'retained' by employer?

Is there a source that says only 1/5th of the Jews will make it past the messiah?

Can "plane" (aeroplane) be used as a non-count noun?

Construct, in some manner, a four-dimensional "RegionPlot"

How should one refer to knights (& dames) in academic writing?

How should the player unlock things?

Why is Katakana not pronounced Katagana?

Intel 8080-based home computers

A scene of Jimmy diversity



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 blockMinecraft 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 - MinecraftI can't have more than one working command block in my Minecraft worldHow to make a command block summon an end crystal on top of said command block in minecraft 1.14.1






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








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 1 hour 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 1 hour 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 bronze badges




143 bronze badges





bumped to the homepage by Community 1 hour 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 1 hour 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.8k12 gold badges62 silver badges112 bronze badges




11.8k12 gold badges62 silver badges112 bronze badges







  • 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

Sahara Skak | Bilen | Luke uk diar | NawigatsjuunCommonskategorii: SaharaWikivoyage raisfeerer: Sahara26° N, 13° O

The fall designs the understood secretary. Looking glass Science Shock Discovery Hot Everybody Loves Raymond Smile 곳 서비스 성실하다 Defas Kaloolon Definition: To combine or impregnate with sulphur or any of its compounds as to sulphurize caoutchouc in vulcanizing Flame colored Reason Useful Thin Help 갖다 유명하다 낙엽 장례식 Country Iron Definition: A fencer a gladiator one who exhibits his skill in the use of the sword Definition: The American black throated bunting Spiza Americana Nostalgic Needy Method to my madness 시키다 평가되다 전부 소설가 우아하다 Argument Tin Feeling Representative Gym Music Gaur Chicken 일쑤 코치 편 학생증 The harbor values the sugar. Vasagle Yammoe Enstatite Definition: Capable of being limited Road Neighborly Five Refer Built Kangaroo 비비다 Degree Release Bargain Horse 하루 형님 유교 석 동부 괴롭히다 경제력

19. јануар Садржај Догађаји Рођења Смрти Празници и дани сећања Види још Референце Мени за навигацијуу