Minecraft Blogs / Tutorial

Minecraft Command Blogs | /trigger, PickupDelay, Age, CanPlaceOn, HideFlags and a lot more!

  • 29,652 views, 2 today
  • 18
  • 7
  • 17
Pepijn's Avatar Pepijn
Level 57 : Grandmaster Cyborg
382
Minecraft Command Blogs
By Pepijn96
/trigger, PickupDelay, Age, CanPlaceOn, HideFlags and a lot more!

A new Snapshot has been released and as always, Mojang has added some stuff for us to explore on our own. If you however don't feel like discovering what you have to do... well, then you are at the right place!

/trigger
If we want to work with /trigger we first need to take a look at the /scoreboard command, because what trigger does is that it allows non OP players to activate Commands! first you will need to make a scoreboard objective with the type trigger:

/scoreboard objective add [Name] trigger [Display Name]

After this the Player can use the /trigger command to add or set scores to that specific objective, but only when you have done /scoreboard players enable [@p/@a/@r/IGN] [Name of objective]!
After the player is allowed to change it he/she can do this by using the /trigger command:

/trigger [Name of objective] {set;add} [Value]

This command can be used by everyone, so you don't have to be OP. You can even smoothen this a little bit by using /tellraw and clickEvent:

/tellraw [@p;@a;@r] {text:"Click ",extra:[{text:"Here!",bold:true,clickEvent:{action:run_command,value:/"trigger Name of objective] {set;add} [Value]"}}]}


PickupDelay and Age
These tags aren't new but when you set PickupDelay to 32767 the Item can never be picked up and when you set Age to -32768, the Item will never despawn.

CanPlaceOn
This tags goes hand in hand with the new Adventure Mode, where in you can't place blocks on the ground by default. But when you use the CanPlaceOn tag when giving yourself or the player an item, it can be placed on the blocks you specify. It looks like this:

/give [@a/@p/@r/IGN] [minecraft:] [amount] [damage] {CanPlaceOn:["minecraft:"]

Together with CanDestroy, this tag gives way more control over Adventure Maps and makes cheating harder to do.

HideFlags
This tag allows you to hide the Information given when hovering over an item in your inventory.

/give [@a/@p/@r/IGN] [minecraft:] [amount] [damage] {HideFlags:}

Others
With /scoreboard players reset you can now specify what objective to reset:

/scoreboard players reset [@p/@a/@r/IGN] [Objective]

With a "*" you can now set,add,remove,reset scores of every player that is on the scoreboard, even when that player is not online or when the player doesn't even exist

By adding true or false behing your usual /effect command you can determine if the particles show up or not (true for no particles)

Want more?
Be sure to diamond if this helped you and if you want more of these, just let me know!

Pepijn96
Tags

Create an account or sign in to comment.

1
08/17/2017 9:06 pm
Level 61 : High Grandmaster Cowboy
BlocklyCow
BlocklyCow's Avatar
this is confusing :P
1
05/09/2015 11:50 pm
Level 5 : Apprentice Crafter
DigitalJokerMan
DigitalJokerMan's Avatar
Pepijin: This tags goes hand in hand with the new Adventure Mode
Me: Wait, what did that say?
Pepijin: This tags goes hand in hand with the new Adventure Mode
Me: Wait..
Pepijin: new Adventure Mode
Pepijin: new Adventure Mode
Pepijin: neeeeeeeeeeeew Adventure Mode
Me: Oh, so apperently this 2012... MIND BLOWN!
1
01/13/2016 12:06 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Bit of a late reply, but came across this again. I was talking about how they changed the mechanics of the adventure gamemode so you can't place or break blocks without them / the tools having the appropriate datatags (instead of being only able to break blocks with just the right tool for it).
1
03/02/2015 7:41 am
Level 30 : Artisan Engineer
Daniel_Edits
Daniel_Edits's Avatar
Can you use a specific player name when using trigger?  Please help with that, thanks!
1
03/02/2015 3:41 pm
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
At every place in the commands above where you see something simular to [@p/@a/@r/IGN] you can fill in a specific player name (Hence the "IGN", what stands for "ingame name")
1
03/02/2015 7:46 pm
Level 30 : Artisan Engineer
Daniel_Edits
Daniel_Edits's Avatar
But there isn't one for trigger, is that not possible?  (I am trying to make a vanilla voting mechanic)
1
03/03/2015 2:13 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
The /trigger command doesn't have a target selector. But tellraw does and the trigger will execute for whoever clicks the text.

To be clear. If I click the text, my score will be changed. If my friend clicks the text (could be the very same text I clicked on) his score will be changed.

If you wish to set the score of person 2 when person 1 clicks the text, you will have to do a work-around and test for a scorechange of person what will activate a commandblock that changes the score for person 2.
1
03/03/2015 6:03 pm
Level 30 : Artisan Engineer
Daniel_Edits
Daniel_Edits's Avatar
Thanks for the explanation.  Guess my idea for a vanilla voting mechanic isn't going to work.
1
02/17/2015 12:12 am
Level 42 : Master Princess
tubi
tubi's Avatar
I want to use the trigger command, but after doing all of that, how do I make that the change of score value is detected by a command block? I mean, I create the objective, then I enable it, after that I create the tell raw command with the click event of the trigger score, and finally the score value changes to 1 (for example) then what. Thanks anyway  for the help and diamond(:
1
02/17/2015 6:21 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
It depends on what you want to do. In general you can use /testfor or /execute to detect scoreboard values (execute is recommended when using a fast setblock/fill clock), but when the command you want to execute already contains a target selector (so for example /give or /tellraw) you can skip the testfor/execute since you can just do /give @a[score_objectivename_min=x]. Also make sure to include a reset after you executed whatever you wanted to execute, so /scoreboard player set [target selector] [objective] 0 if you plan on making it re-usable.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome