[],display:{Name:lightning_line,Lore:[发射一根普通箭矢就好]}}},{id:MinecartCommandBlock,Command:/replaceitem entity @a[r=5] slot.hotbar.1 minecraft:arrow 64 0 {ench:[],display:{Name:an_arrow,Lore:[用lightning_line射出去就好]}}},{id:MinecartCommandBlock,Command:/setblock ~ ~-1 ~ ...
This can be helpful if you want an overview of the command.See more in the Popular Commands documentation. Any No /hud Configures whether elements of the on-screen display (alternately known as the 'heads up display', or 'HUD') are visible on the screen. Game Directors Yes /input...
options?:TitleDisplayOptions=null Notes: This function can't be called in read-only mode. This function can throw errors. Examples setTitle.ts TypeScript import{ world, DimensionLocation }from"@minecraft/server";functionsetTitle(targetLocation: DimensionLocation){constplayers = world.getPlayers();if...
Examples getFirstHotbarItem.ts TypeScript import{ world, EntityInventoryComponent, DimensionLocation }from"@minecraft/server";functiongetFirstHotbarItem(log: (message:string, status?:number) =>void, targetLocation: DimensionLocation){for(constplayer of world.getAllPlayers()) {constinventory = player...
Returns the lore value - a secondary display string - for an ItemStack.Returns string[] - An array of lore lines. If the item does not have lore, returns an empty array.getTagsgetTags(): string[]Returns a set of tags associated with this item stack.Returns string[]...
2. Type the Command We will cover examples of how to use the /execute command that chain multiple execute commands together. Summon a Cat if within 5 blocks of a Specific Coordinate In this example, we are going to first align the current xyz position in the block grid and then summon ...
Code examples Simple command registration new CommandAPICommand("enchantitem") .withArguments(new EnchantmentArgument("enchantment")) .withArguments(new IntegerArgument("level", 1, 5)) .executesPlayer((player, args) -> { Enchantment enchantment = (Enchantment) args.get("enchantment"); int level...
command_block"},Data:1,TileEntityData:{Command:"/scoreboard objectives setdisplay sidebar sec",auto:1},Time:1,DropItem:0,Passengers:[{id:"falling_block",BlockState:{Properties:{conditional:"false",facing:"up"},Name:"minecraft:command_block"},Data:1,TileEntityData:{Command:"/scoreboard ...
To check the value of the worldbuilder ability for the nearest player, you would need to type the following command:/ability @p worldbuilderType the command in the chat window and press the Enter key to run the command.This command would display what the worldbuilder ability is currently set ...
serverMOTD The MOTD to display for Minecraft Servers.You can specify colour codes just as you can for serverName. Defaults to serverName if not set. (Still does not work on Bedrock) Same as serverName serverPort The port of your Java Edition server (0 to disable) 25565 bedrockPort The ...