Yes there is.
/scoreboard teams add nopvp
/scoreboard teams join nopvp @a
/scoreboard teams option nopvp friendlyfire false
The teams add command creates the team, the teams join one puts players on the team (Make it run when the start button or something is pressed), and the teams option one stops people on that team PVPing each other. (There are also other options like color (Sets their chat colour), seefriendlyinvisibles (Allows them to see each other when they're invisible), etc.)
EDIT: You can also put a mob on the team so players can't attack the mob but other mobs can (Provided they aren't on the team too). So you could mkae a Defend the Villager game with it or something like that.
Now, to use repeating and chain command blocks for my own things, can I have a repeating command block with, say, /testfor @p [r=2], and then, in a chain command block after that, have /setblock or /tp or anything really, but ONLY if a player is within a radius of two?
Oh yeah, does this work as well? Having a /testfor @p [m=1]?
The Meaning of Life, the Universe, and Everything.
Join Date:
5/4/2015
Posts:
62
Location:
Mt. RAINBOW
Minecraft:
JoshsJournys
Member Details
Using m=1 for mode does work, make sure you have it like this without a gap though
/testfor @p[m=1]
Also make sure that if you want to test for the nearest player within 2 blocks you can either add r=2 like so [m=1,r=2] and you can also make it easier by using c for creative, s for survival, sp for spectator and a for adventure like so [m=c]
Almost forgot to mention that a chain command block will need to be changed to conditional with the arrow on it facing opposite the block (the arrow on the repeater should be going into the chain command block for it to activate as well)
with 1.11, unfortunately it changed half the monster commands :(.
I had generated a bunch of enemies to go with it, with special enchanted armour and weapons, but now it just spawns the monster without any weapons or armour.
Would anyone be able to take some time and convert these commands for me please?
/summon Zombie ~ ~1 ~ {DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:"iron_sword",damage:0,ench:[{id:8,lvl:2}],Count:1},{id:"chainmail_boots",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_leggings",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_chestplate",damage:0,ench:[{id:0,lvl:1}],Count:1},{}],CustomName:"Alien",NoAI:1b,Invulnerable:1} (the last no Ai and invulnerable is just an addon I used)
Is there a way to keep something in a spot in someone's inventory? Like, say, a pumpkin on someone's head? So that, they cannot take it away?
For the armor slots, you can simply use the Curse of Binding enchantment. For other items, you have to detect if the item is gone and then replace it.
(Includes clearing the item and setting its PickupDelay to 0 in case it is being dropped)
In some adventure maps I've played, you can take an item from it's slot, it replaces it, but you've still got the original copy of the item in your hand, pretty much duplicated. This won't do that, will it?
And, like, if they're still holding it, will it take it from their grasp and put it back? This isn't so much for this adventure map, 'cause it's single player, but in my next one I don't want players trading items.
How would I make command links in chat? Like, it says something in chat, and then, at the end of the message, it says 'Click Here to continue', you click, and it says the next message, and so on...
How would I do that, so it sets a redstone block when you click it?
How would I make command links in chat? Like, it says something in chat, and then, at the end of the message, it says 'Click Here to continue', you click, and it says the next message, and so on...
How would I do that, so it sets a redstone block when you click it?
Using /tellraw. It's pretty complicated so I recommend finding an engine. I use minecraft.tool which can also generate custom superflats, custom books and stuff like that. Here's an example of how complex /tellraw is:
/tellraw @p ["",{"text":"Hello.
","color":"green"},{"text":"[Click To
Continue]","color":"red","clickEvent":{"action":"run_command","value":"/setblock
~ ~10 ~ redstone_block"}}]
would have some green text saying "Hello." and some red text saying "[Click To Continue]" that would set a redstone block 10 blocks above the player when clicked.
Rollback Post to RevisionRollBack
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
Using /tellraw. It's pretty complicated so I recommend finding an engine. I use minecraft.tool which can also generate custom superflats, custom books and stuff like that. Here's an example of how complex /tellraw is:
/tellraw @p ["",{"text":"Hello.
","color":"green"},{"text":"[Click To
Continue]","color":"red","clickEvent":{"action":"run_command","value":"/setblock
~ ~10 ~ redstone_block"}}]
would have some green text saying "Hello." and some red text saying "[Click To Continue]" that would set a redstone block 10 blocks above the player when clicked.
The thing you have to consider when doing this is that the player needs the permission level required for the command. If you want to disable cheats in your final map (which looks more professional!) or if the map might be used on a server, you need to replace the command with one the player has permission to use.
The most useful command in this case is the /trigger command, which allows players to modify scoreboards for themself, but only when you allow them to. This has the other advantage that it can only be used once.
Create a scoreboard objective of the type "trigger"
/scoreboard objectives add click trigger
Print the command and allow using it.
/tellraw @a [{"text":"Hello.
","color":"green"},{"text":"[Click To
Continue]","color":"red","clickEvent":{"action":"run_command","value":"/trigger click set 1"}}]
/scoreboard players enable @a click
after that, use a repeating command block chain to test for a click score of one:
In some adventure maps I've played, you can take an item from it's slot, it replaces it, but you've still got the original copy of the item in your hand, pretty much duplicated. This won't do that, will it?
And, like, if they're still holding it, will it take it from their grasp and put it back? This isn't so much for this adventure map, 'cause it's single player, but in my next one I don't want players trading items.
You can clear the specific item out of the players inventory using the /clear command. If the player is in adventure/survival mode, it will also clear the item currently being hold by the mouse.
This is kinda complicated, and not EXACTLY neccessary, but would make the final map so much more awesome, so...
I'm having several different kinds of guns, for instance: pistol, shotgun, semi-auto machine gun, flamethrower, etc.
Is there a way to make a random item, u right click with it, it fires out an arrow (flaming maybe) at different speeds, takes a certain bit of ammo from inventory, and then after several shots, takes several seconds to reload, with different amounts of time between shots?
The Meaning of Life, the Universe, and Everything.
Location:
Somewhere
Join Date:
12/13/2016
Posts:
162
Location:
Right here
Minecraft:
CyberneticSquid
Member Details
K not really sure how the ammo removing could work but heres how you can have different guns: a carrot on a stick with different textures depending on durability. /give the carrot on stick with different damage and custom names make them unbreakable so you dont see durability do some stuff with stats to test when you right click figure out the name of the held item and depending on what it is summon different arrows, snowballs, fireball etc.
Rollback Post to RevisionRollBack
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
Another question that doesn't really involve commands, but textures instead:
I have a section of iron bars that you are supposed to mine with a pickaxe, but I don't want you able to mine all of them, (barrier is unavaliable), with my custom RP, if I change a certain glass pane to look like iron bars, will it be convincing? Like, will they look the same, or is there another way I can make them unavaliable to mine?
Thx bro! Works almost perfectly (the command works fine), except, your the pickaxe can only mine 4 blocks (I set this), so you could destroy it uselessly on them, but then again, I can just make it an unbreaking one, and just clear the inventory.
Yes there is.
/scoreboard teams add nopvp
/scoreboard teams join nopvp @a
/scoreboard teams option nopvp friendlyfire false
The teams add command creates the team, the teams join one puts players on the team (Make it run when the start button or something is pressed), and the teams option one stops people on that team PVPing each other. (There are also other options like color (Sets their chat colour), seefriendlyinvisibles (Allows them to see each other when they're invisible), etc.)
EDIT: You can also put a mob on the team so players can't attack the mob but other mobs can (Provided they aren't on the team too). So you could mkae a Defend the Villager game with it or something like that.
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
All hail chickens.
Put all players on a team, then disable the PvP on that team.
EDIT: sorry, didnt saw that CyberneitcSquid already explained that. oops
You know that you are lazy when you do a program to write a program
XD,
Now, to use repeating and chain command blocks for my own things, can I have a repeating command block with, say, /testfor @p [r=2], and then, in a chain command block after that, have /setblock or /tp or anything really, but ONLY if a player is within a radius of two?
Oh yeah, does this work as well? Having a /testfor @p [m=1]?
For mode?
Using m=1 for mode does work, make sure you have it like this without a gap though
/testfor @p[m=1]
Also make sure that if you want to test for the nearest player within 2 blocks you can either add r=2 like so [m=1,r=2] and you can also make it easier by using c for creative, s for survival, sp for spectator and a for adventure like so [m=c]
Almost forgot to mention that a chain command block will need to be changed to conditional with the arrow on it facing opposite the block (the arrow on the repeater should be going into the chain command block for it to activate as well)
oh, thx that will be good, using so the command won't actually activate unless their in adventure mode...
with 1.11, unfortunately it changed half the monster commands :(.
I had generated a bunch of enemies to go with it, with special enchanted armour and weapons, but now it just spawns the monster without any weapons or armour.
Would anyone be able to take some time and convert these commands for me please?
/summon Zombie ~ ~1 ~ {DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:"iron_sword",damage:0,ench:[{id:8,lvl:2}],Count:1},{id:"chainmail_boots",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_leggings",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_chestplate",damage:0,ench:[{id:0,lvl:1}],Count:1},{}],CustomName:"Alien",NoAI:1b,Invulnerable:1} (the last no Ai and invulnerable is just an addon I used)
/summon Zombie ~ ~1 ~ {DropChances:[0f,0f,0f,0f,0f],Equipment:[{id:"iron_sword",damage:0,ench:[{id:8,lvl:4},{id:11,lvl:2}],Count:1},{id:"iron_boots",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"iron_leggings",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"iron_chestplate",damage:0,ench:[{id:0,lvl:1}],Count:1},{}],CustomName:"Elite Alien"}
/summon Skeleton ~ ~1 ~ {CustomName:"Alien",Equipment:[{id:"bow",damage:0,ench:[{id:18,lvl:1},{id:19,lvl:1}],Count:1},{id:"chainmail_boots",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_leggings",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"chainmail_chestplate",damage:0,ench:[{id:0,lvl:1}],Count:1},{}],DropChances:[0f,0f,0f,0f,0f],Attributes:[{Name:generic.followRange,Base:10}]}
/summon Skeleton ~ ~1 ~ {CustomName:"Elite Alien",Equipment:[{id:"bow",damage:0,ench:[{id:18,lvl:2},{id:19,lvl:2}],Count:1},{id:"iron_boots",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"iron_leggings",damage:0,ench:[{id:0,lvl:1}],Count:1},{id:"iron_chestplate",damage:0,ench:[{id:0,lvl:1}],Count:1},{}],DropChances:[0f,0f,0f,0f,0f],Attributes:[{Name:generic.followRange,Base:10}]}
If anyone can do this, thankyou!
Oh nevermind everyone, I found a converter. Thx anyway!
Is there a way to keep something in a spot in someone's inventory? Like, say, a pumpkin on someone's head? So that, they cannot take it away?
For the armor slots, you can simply use the Curse of Binding enchantment. For other items, you have to detect if the item is gone and then replace it.
(Includes clearing the item and setting its PickupDelay to 0 in case it is being dropped)
My projects: https://blockbench.net/hub
In some adventure maps I've played, you can take an item from it's slot, it replaces it, but you've still got the original copy of the item in your hand, pretty much duplicated. This won't do that, will it?
And, like, if they're still holding it, will it take it from their grasp and put it back? This isn't so much for this adventure map, 'cause it's single player, but in my next one I don't want players trading items.
How would I make command links in chat? Like, it says something in chat, and then, at the end of the message, it says 'Click Here to continue', you click, and it says the next message, and so on...
How would I do that, so it sets a redstone block when you click it?
Using /tellraw. It's pretty complicated so I recommend finding an engine. I use minecraft.tool which can also generate custom superflats, custom books and stuff like that. Here's an example of how complex /tellraw is:
/tellraw @p ["",{"text":"Hello.
","color":"green"},{"text":"[Click To
Continue]","color":"red","clickEvent":{"action":"run_command","value":"/setblock
~ ~10 ~ redstone_block"}}]
would have some green text saying "Hello." and some red text saying "[Click To Continue]" that would set a redstone block 10 blocks above the player when clicked.
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
All hail chickens.
Okay Thankyou!!!!!!!!
The thing you have to consider when doing this is that the player needs the permission level required for the command. If you want to disable cheats in your final map (which looks more professional!) or if the map might be used on a server, you need to replace the command with one the player has permission to use.
The most useful command in this case is the /trigger command, which allows players to modify scoreboards for themself, but only when you allow them to. This has the other advantage that it can only be used once.
Create a scoreboard objective of the type "trigger"
Print the command and allow using it.
after that, use a repeating command block chain to test for a click score of one:
And reset the score afterwards.
My projects: https://blockbench.net/hub
You can clear the specific item out of the players inventory using the /clear command. If the player is in adventure/survival mode, it will also clear the item currently being hold by the mouse.
My projects: https://blockbench.net/hub
This is kinda complicated, and not EXACTLY neccessary, but would make the final map so much more awesome, so...
I'm having several different kinds of guns, for instance: pistol, shotgun, semi-auto machine gun, flamethrower, etc.
Is there a way to make a random item, u right click with it, it fires out an arrow (flaming maybe) at different speeds, takes a certain bit of ammo from inventory, and then after several shots, takes several seconds to reload, with different amounts of time between shots?
K not really sure how the ammo removing could work but heres how you can have different guns: a carrot on a stick with different textures depending on durability. /give the carrot on stick with different damage and custom names make them unbreakable so you dont see durability do some stuff with stats to test when you right click figure out the name of the held item and depending on what it is summon different arrows, snowballs, fireball etc.
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
All hail chickens.
Another question that doesn't really involve commands, but textures instead:
I have a section of iron bars that you are supposed to mine with a pickaxe, but I don't want you able to mine all of them, (barrier is unavaliable), with my custom RP, if I change a certain glass pane to look like iron bars, will it be convincing? Like, will they look the same, or is there another way I can make them unavaliable to mine?
You can use /setblock or /fill in a repeating comamnd block so you can't pass them by mining. like this:
/fill 12 45 7 19 47 7 iron_bar
or
/setblock 54 32 9 iron_bar
I'm a Whovian squid who likes drawing.
I'm also quite nerdy with an interest in game developing and the concept of a fourth spatial dimension.
All hail chickens.
Thx bro! Works almost perfectly (the command works fine), except, your the pickaxe can only mine 4 blocks (I set this), so you could destroy it uselessly on them, but then again, I can just make it an unbreaking one, and just clear the inventory.
Thanks!