this is considered a simple command in Minecraft, but I think I can help you. To teleport a player, have them either step on a pressure plate, press a button, or switch a lever that is next to a command block with the command /tp @p x y z
When I say x y z
I mean the coordinates that you want to teleport the player to. To get those coordinates, go to the location you want the player(s) to teleport to, and press the keys: fn+f3
(function key and the f3 key.) On one of the rows of text in the upper left-center, there will be something like x=46.33263 y=3643.532366 z=125.23146
. You do not need the decimals to teleport the player, so just remember the numbers 46,3643,125
or whatever your set of numbers may be. Simply replace the x y z
that you put into the command block with these numbers, and Ta Da! (Also, if one or more of these numbers are negative, then the number put into the command block ALSO has to be a negative number.) Just in case you didn't know, to get a command block, you do /give @p minecraft:command_block
Hope this Helps!
-A
You'll need to "translate" the glass bottle data tag into something that works with target selectors (@a and so on). This can be achieved most easily using dummy scoreboard values or, in 1.9, scoreboard tags.
In 1.8, create an objective using
scoreboard objectives add bottleInOne dummy
Create a fill clock and run the following two commands
scoreboard players set @a[score_bottleInOne_min=1] bottleInOne 0
scoreboard players set @a[score_bottleInOne=0] bottleInOne 1 {SelectedItemSlot:0,SelectedItem:{id:minecraft:glass_bottle}}
If the team part is necessary, you can now add @a[score_bottleInOne_min=1]
to the team, and remove @a[score_bottleInOne=0]
from it, using the same fill clock. You could also use these target selectors directly for the /effect
and /replaceitem
commands, if the team part was just your idea of selecting that player for the effect.
In 1.9, you can omit the scoreboard objective in favor of tags. Using a Repeat/Chain command block chain, run
scoreboard players tag @a[tag=bottleInOne] remove bottleInOne
scoreboard players tag @a[tag=!bottleInOne] add bottleInOne {SelectedItemSlot:0,SelectedItem:{id:minecraft:glass_bottle}}
In the following commands, you can then use @a[tag=bottleInOne]
or @a[tag=!bottleInOne]
to target players with and without the bottle selected in slot 0, respectively.
Best Answer
For 1, you can either use a
/data get entity @e[type=item_frame,limit=1] ItemRotation
or a comparator.For 3, you can simply just use
/kill @e [type=item_frame,limit=1]
and then/summon ItemFrame <x> <y> <z> {Direction:facingb,Item:{green_stained_glass_pane}}
replacing "facing" (leave the letter b as it is) with the way it is facing (0=south, 1=west, 2=north, and 3=east.)Also, item frames count as entities, not as blocks.