Arqade is a question and answer site for passionate videogamers on all platforms. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a mob arena (dark) so that I can finish a mini game map. I want to put a button that will give the nearest player an extended Potion of Night Vision. What would be the code to spawn that in?

share|improve this question
You could put them in dispensers at random checkpoints. – Jeffrey Lin Feb 28 '13 at 1:40
This is for an arena, and I need an unlimited amount because it will take a very long time for the player to win. – Shadow Z. Feb 28 '13 at 1:43
A Potion of Night Vision lasts for six minutes. – Jeffrey Lin Feb 28 '13 at 1:44
And? The mini game is designed for a group. It requires 64 Golden Apples, which cost 64 gold each, which require 64 gold collected, which a gold is 1 mob drop. – Shadow Z. Feb 28 '13 at 1:46
up vote 2 down vote accepted

The data value for potions is 373 and the "damage value" for an extended Night Vision potion is 8262, and you want to give quantity 1. Using these in a command block hooked up to your button, with @p used to select the nearest player, looks like so:

/give @p 373 1 8262

Assuming you want this button to work only once, you can put an RS NOR latch between the button and the command block, so that the button activates the SET input (optionally with a hidden button accessible only to you attached to the RESET input, for easy testing).

You may also want to use the /say command to alert the player that they just got the potion, since in the heat of the moment it's easy to overlook something quietly popping into your inventory, if your not expecting it. They'll still have to ready and drink it.

share|improve this answer

You can do /effect @p 16 (which is night vision) 999999 (which is forever) 255 (amplifier) you don't have to put in the parenthesis.

share|improve this answer
This does solve my problem (but does not answer the question). +1 for thinking outside the box tho. – Shadow Z. Mar 9 '15 at 3:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.