Skip to content

Commit e2cf223

Browse files
Updated docs for commands
1 parent 4fcad22 commit e2cf223

3 files changed

Lines changed: 136 additions & 94 deletions

File tree

docs/MinecraftApi/@minecraft/server/impact_of_removing_runCommand.md

Lines changed: 0 additions & 76 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Impact of Removing .runCommand
2+
3+
Method `runCommand` has been removed from Gametest/Script API.
4+
The replacement `runCommandAsync` doesn't return much information.
5+
6+
What has been affected?
7+
8+
## /ability
9+
10+
You can't read player's abilites.
11+
12+
## /gamerule
13+
14+
Cannot read game rules' value.
15+
16+
## /list
17+
18+
Cannot get how many players can join the world (player join limit).
19+
20+
## /locate
21+
22+
1. Cannot get structure's location.
23+
2. Cannot get biome's location.
24+
25+
## /time
26+
27+
Cannot get world's time (relative and daytime).
28+
29+
## /xp
30+
31+
Cannot get player's experience.
32+
33+
## /weather
34+
35+
Cannot get weather.

docs/MinecraftApi/@minecraft/server/runCommandAsync.md

Lines changed: 101 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,104 @@
22

33
Runs a particular command asynchronously from the context of the broader dimension. Note that there is a maximum queue of 128 asynchronous commands that can be run in a given tick.
44

5-
Normally we recommend avoiding using this function however the following command features are not implemented in scripting API (as of 1.19.50).
6-
7-
- `/kick`
8-
- `/gamemode`
9-
- `/gamerule`
10-
- `/weather`
11-
- `/ability`
12-
- `/setblock ... destroy`
13-
- `/xp`
14-
- `/tickingarea`
15-
- `/replaceitem` partial
16-
- `/clear` partial
17-
- `@s[hasitem=]` partial
18-
- `/function` partial
19-
- `/loot` partial
20-
- `/scoreboard` partial
21-
- `/locate`
22-
- `/damage` partial
5+
Normally we recommend avoiding using commands, however, the following command features are not implemented in scripting API (as of 1.19.50).
6+
7+
## @s[hasitem=]
8+
9+
1. Can't access enderchest.
10+
2. Can't access equipments.
11+
12+
## /replaceitem
13+
14+
1. Can't access enderchest.
15+
2. Can't access equipments.
16+
17+
## /clear
18+
19+
1. Can't access enderchest.
20+
2. Can't access equipments.
21+
22+
## /tickingarea
23+
24+
1. Can't access ticking areas.
25+
26+
## /kick
27+
28+
1. Can't kick player.
29+
30+
## /setblock
31+
32+
1. `/setblock ... destroy`
33+
34+
## /fill
35+
36+
1. `/fill` is fast.
37+
38+
## /ability
39+
40+
1. You can't set abilities for each players
41+
2. You can't read player's abilites
42+
43+
## /damage
44+
45+
1. There's no way to give damage to players & entities
46+
2. Opening GUI with custom command will not possible (unless there's another way) because it's need damage for close the chat UI
47+
48+
## /execute
49+
50+
1. New execute can be useful to run command with lot of if/unless condition for simplicity or maybe performance
51+
2. Cannot run `/loot` command with execute
52+
53+
## /function
54+
55+
1. Cannot run function command
56+
57+
## /gamerule
58+
59+
1. Cannot set any game rules
60+
2. Cannot read game rules’ value
61+
62+
## /give
63+
64+
1. Cannot give item with these following NBT Data
65+
1. `minecraft:can_place_on`
66+
2. `minecraft:can_destroy`
67+
3. `minecraft:item_lock`
68+
4. `minecraft:keep_in_inventory`
69+
70+
## /gamemode
71+
72+
1. Cannot set player's gamemode
73+
74+
## /locate
75+
76+
1. Cannot get structure’s location
77+
2. Cannot get biome’s location
78+
79+
## /loot
80+
81+
1. Even though the loot is broken from the start, but it's useful for drop or set the item to players/world
82+
83+
## /scoreboard
84+
85+
1. Cannot add/set/remove/operation/reset players/entities’ score
86+
87+
## /time
88+
89+
1. Cannot set world’s time
90+
2. Cannot get world’s time (relative and daytime)
91+
92+
## /xp
93+
94+
1. Cannot set/get player’s experience
95+
96+
## Another Commands
97+
98+
Following commands useful for mapmaking are cannot be replaced with JS code:
99+
100+
1. Camerashake
101+
2. Event
102+
3. Fog
103+
4. Music
104+
5. Playsound & Stopsound
105+
6. Weather

0 commit comments

Comments
 (0)