Search
Preparing search index...
The search index is not available
mdkjs
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
mdkjs
Command
Class Command
Hierarchy
ContextAbstract
Command
Index
Constructors
constructor
Properties
#context
#target
Accessors
advancement
attribute
bossbar
context
data
datapack
effect
execute
experience
forceload
gamerule
loot
recipe
replaceitem
schedule
tag
team
time
title
trigger
weather
whitelist
worldborder
Methods
$function
ban
ban
Ip
ban
List
clear
clone
debug
defaultgamemode
deop
difficulty
enchant
fill
gamemode
kick
kill
list
locate
locatebiome
me
msg
objective
op
pardon
pardon
Ip
particle
playsound
publish
reload
save
save
All
save
Off
save
On
say
scoreboard
seed
setblock
setidletimeout
setworldspawn
spawnpoint
spectate
spreadplayers
stop
stopsound
summon
teammsg
teleport
tell
tellraw
tm
tp
w
Constructors
constructor
new
Command
(
target
?:
Selector
)
:
Command
Parameters
target:
Selector
= ...
Returns
Command
Properties
Private
#context
#context
:
File
<
{}
>
Private
Readonly
#target
#target
:
Selector
Accessors
advancement
get
advancement
(
)
:
Advancement
Returns
Advancement
attribute
get
attribute
(
)
:
Attribute
Returns
Attribute
bossbar
get
bossbar
(
)
:
Bossbar
Returns
Bossbar
context
get
context
(
)
:
File
<
{}
>
获取上下文对象
Returns
File
<
{}
>
data
get
data
(
)
:
Data
Returns
Data
datapack
get
datapack
(
)
:
Datapack
Returns
Datapack
effect
get
effect
(
)
:
Effect
Returns
Effect
execute
get
execute
(
)
:
Execute
Returns
Execute
experience
get
experience
(
)
:
Experience
Returns
Experience
forceload
get
forceload
(
)
:
Forceload
Returns
Forceload
gamerule
get
gamerule
(
)
:
GameRule
Returns
GameRule
loot
get
loot
(
)
:
Loot
Returns
Loot
recipe
get
recipe
(
)
:
Recipe
Returns
Recipe
replaceitem
get
replaceitem
(
)
:
ReplaceItem
Returns
ReplaceItem
schedule
get
schedule
(
)
:
Schedule
Returns
Schedule
tag
get
tag
(
)
:
Tag
Returns
Tag
team
get
team
(
)
:
Team
Returns
Team
time
get
time
(
)
:
Time
Returns
Time
title
get
title
(
)
:
Title
Returns
Title
trigger
get
trigger
(
)
:
Trigger
Returns
Trigger
weather
get
weather
(
)
:
Weather
Returns
Weather
whitelist
get
whitelist
(
)
:
WhiteList
Returns
WhiteList
worldborder
get
worldborder
(
)
:
WorldBorder
Returns
WorldBorder
Methods
$function
$function
(
name
:
string
)
:
Command
Parameters
name:
string
Returns
Command
ban
ban
(
reason
?:
string
)
:
Command
Parameters
Optional
reason:
string
Returns
Command
ban
Ip
ban
Ip
(
ip
:
string
, reason
?:
string
)
:
Command
Parameters
ip:
string
Optional
reason:
string
Returns
Command
ban
List
ban
List
(
type
?:
BanTargetType
)
:
Command
Parameters
Optional
type:
BanTargetType
Returns
Command
clear
clear
(
item
:
string
, maxCount
:
number
)
:
Command
Parameters
item:
string
maxCount:
number
Returns
Command
clone
clone
(
from
:
string
, to
:
string
, dist
:
string
)
:
Command
clone
(
from
:
string
, to
:
string
, dist
:
string
, maskMode
:
MaskMode
)
:
Command
clone
(
from
:
string
, to
:
string
, dist
:
string
, maskMode
:
MaskMode
, cloneMode
:
CloneMode
)
:
Command
clone
(
from
:
string
, to
:
string
, dist
:
string
, maskMode
:
MaskMode
, cloneMode
:
CloneMode
, blockId
:
string
)
:
Command
Parameters
from:
string
to:
string
dist:
string
Returns
Command
Parameters
from:
string
to:
string
dist:
string
maskMode:
MaskMode
Returns
Command
Parameters
from:
string
to:
string
dist:
string
maskMode:
MaskMode
cloneMode:
CloneMode
Returns
Command
Parameters
from:
string
to:
string
dist:
string
maskMode:
MaskMode
cloneMode:
CloneMode
blockId:
string
Returns
Command
debug
debug
(
action
:
ActionType
)
:
Command
Parameters
action:
ActionType
Returns
Command
defaultgamemode
defaultgamemode
(
mode
:
GameMode
)
:
Command
Parameters
mode:
GameMode
Returns
Command
deop
deop
(
player
:
Selector
)
:
Command
Parameters
player:
Selector
Returns
Command
difficulty
difficulty
(
mode
:
GameMode
)
:
Command
Parameters
mode:
GameMode
Returns
Command
enchant
enchant
(
enchantId
:
EnchantmentId
, level
:
number
)
:
Command
Parameters
enchantId:
EnchantmentId
level:
number
Returns
Command
fill
fill
(
from
:
string
, to
:
string
, blockId
:
BlockItemId
)
:
Command
fill
(
from
:
string
, to
:
string
, blockId
:
BlockItemId
, mode
:
FillMode
)
:
Command
fill
(
from
:
string
, to
:
string
, blockId
:
BlockItemId
, replaceBlockId
:
string
)
:
Command
Parameters
from:
string
to:
string
blockId:
BlockItemId
Returns
Command
Parameters
from:
string
to:
string
blockId:
BlockItemId
mode:
FillMode
Returns
Command
Parameters
from:
string
to:
string
blockId:
BlockItemId
replaceBlockId:
string
Returns
Command
gamemode
gamemode
(
mode
:
GameMode
)
:
Command
Parameters
mode:
GameMode
Returns
Command
kick
kick
(
reason
?:
string
)
:
Command
Parameters
Optional
reason:
string
Returns
Command
kill
kill
(
)
:
Command
Returns
Command
list
list
(
uuids
?:
string
)
:
Command
Parameters
Optional
uuids:
string
Returns
Command
locate
locate
(
structure
:
StructureType
)
:
Command
Parameters
structure:
StructureType
Returns
Command
locatebiome
locatebiome
(
biomeId
:
BiomeId
)
:
Command
Parameters
biomeId:
BiomeId
Returns
Command
me
me
(
msg
:
string
)
:
Command
Parameters
msg:
string
Returns
Command
msg
msg
(
message
:
string
)
:
Command
Parameters
message:
string
Returns
Command
objective
objective
(
name
:
string
, criterion
?:
Criteria
, displayName
?:
string
)
:
Objective
Parameters
name:
string
criterion:
Criteria
= 'dummy'
Optional
displayName:
string
Returns
Objective
op
op
(
player
:
Selector
)
:
Command
Parameters
player:
Selector
Returns
Command
pardon
pardon
(
name
:
string
)
:
Command
Parameters
name:
string
Returns
Command
pardon
Ip
pardon
Ip
(
ip
:
string
)
:
Command
Parameters
ip:
string
Returns
Command
particle
particle
(
particleId
:
ParticleIdType
, location
:
string
)
:
Command
particle
(
particleId
:
ParticleIdType
, location
:
string
, delta
:
string
)
:
Command
particle
(
particleId
:
ParticleIdType
, location
:
string
, delta
:
string
, speed
:
number
)
:
Command
particle
(
particleId
:
ParticleIdType
, location
:
string
, delta
:
string
, speed
:
number
, count
:
number
)
:
Command
particle
(
particleId
:
ParticleIdType
, location
:
string
, delta
:
string
, speed
:
number
, count
:
number
, mode
:
VisibleMode
)
:
Command
Parameters
particleId:
ParticleIdType
location:
string
Returns
Command
Parameters
particleId:
ParticleIdType
location:
string
delta:
string
Returns
Command
Parameters
particleId:
ParticleIdType
location:
string
delta:
string
speed:
number
Returns
Command
Parameters
particleId:
ParticleIdType
location:
string
delta:
string
speed:
number
count:
number
Returns
Command
Parameters
particleId:
ParticleIdType
location:
string
delta:
string
speed:
number
count:
number
mode:
VisibleMode
Returns
Command
playsound
playsound
(
soundPath
:
string
, source
:
string
)
:
Command
playsound
(
soundPath
:
string
, source
:
string
, location
:
string
)
:
Command
playsound
(
soundPath
:
string
, source
:
string
, location
:
string
, volume
:
number
)
:
Command
playsound
(
soundPath
:
string
, source
:
string
, location
:
string
, volume
:
number
, tone
:
number
)
:
Command
playsound
(
soundPath
:
string
, source
:
string
, location
:
string
, volume
:
number
, tone
:
number
, minVolume
:
number
)
:
Command
Parameters
soundPath:
string
source:
string
Returns
Command
Parameters
soundPath:
string
source:
string
location:
string
Returns
Command
Parameters
soundPath:
string
source:
string
location:
string
volume:
number
Returns
Command
Parameters
soundPath:
string
source:
string
location:
string
volume:
number
tone:
number
Returns
Command
Parameters
soundPath:
string
source:
string
location:
string
volume:
number
tone:
number
minVolume:
number
Returns
Command
publish
publish
(
port
?:
string
)
:
Command
Parameters
Optional
port:
string
Returns
Command
reload
reload
(
)
:
Command
Returns
Command
save
save
(
type
:
SaveType
)
:
Command
Parameters
type:
SaveType
Returns
Command
save
All
save
All
(
)
:
Command
Returns
Command
save
Off
save
Off
(
)
:
Command
Returns
Command
save
On
save
On
(
)
:
Command
Returns
Command
say
say
(
message
:
string
)
:
Command
Parameters
message:
string
Returns
Command
scoreboard
scoreboard
(
objective
:
Objective
)
:
Scoreboard
Parameters
objective:
Objective
Returns
Scoreboard
seed
seed
(
)
:
void
Returns
void
setblock
setblock
(
location
:
string
, blockId
:
string
)
:
Command
setblock
(
location
:
string
, blockId
:
string
, mode
:
SetblockMode
)
:
Command
Parameters
location:
string
blockId:
string
Returns
Command
Parameters
location:
string
blockId:
string
mode:
SetblockMode
Returns
Command
setidletimeout
setidletimeout
(
minute
:
number
)
:
Command
Parameters
minute:
number
Returns
Command
setworldspawn
setworldspawn
(
location
?:
string
)
:
Command
Parameters
Optional
location:
string
Returns
Command
spawnpoint
spawnpoint
(
location
:
string
)
:
Command
Parameters
location:
string
Returns
Command
spectate
spectate
(
player
:
string
)
:
Command
Parameters
player:
string
Returns
Command
spreadplayers
spreadplayers
(
location
:
string
, spreadDistance
:
number
, maxRange
:
number
, respectTeams
:
boolean
)
:
Command
Parameters
location:
string
spreadDistance:
number
maxRange:
number
respectTeams:
boolean
Returns
Command
stop
stop
(
)
:
Command
Returns
Command
stopsound
stopsound
(
source
:
string
)
:
Command
stopsound
(
source
:
SoundType
, soundPath
:
string
)
:
Command
Parameters
source:
string
Returns
Command
Parameters
source:
SoundType
soundPath:
string
Returns
Command
summon
summon
(
nbt
:
Entity
, location
?:
string
)
:
Command
Parameters
nbt:
Entity
location:
string
= '~ ~ ~'
Returns
Command
teammsg
teammsg
(
message
:
string
)
:
Command
Parameters
message:
string
Returns
Command
teleport
teleport
(
destination
:
Selector
, rotation
?:
string
)
:
Command
teleport
(
location
:
string
)
:
Command
Parameters
destination:
Selector
Optional
rotation:
string
Returns
Command
Parameters
location:
string
Returns
Command
tell
tell
(
message
:
string
)
:
void
Parameters
message:
string
Returns
void
tellraw
tellraw
(
json
:
LiteralType
<
TextToken
[]
>
)
:
Command
Parameters
json:
LiteralType
<
TextToken
[]
>
Returns
Command
tm
tm
(
message
:
string
)
:
Command
Parameters
message:
string
Returns
Command
tp
tp
(
destination
:
Selector
, rotation
?:
string
)
:
Command
tp
(
location
:
string
)
:
Command
Parameters
destination:
Selector
Optional
rotation:
string
Returns
Command
Parameters
location:
string
Returns
Command
w
w
(
msg
:
string
)
:
Command
Parameters
msg:
string
Returns
Command
Exports
commands
dev
Command
constructor
#context
#target
advancement
attribute
bossbar
context
data
datapack
effect
execute
experience
forceload
gamerule
loot
recipe
replaceitem
schedule
tag
team
time
title
trigger
weather
whitelist
worldborder
$function
ban
ban
Ip
ban
List
clear
clone
debug
defaultgamemode
deop
difficulty
enchant
fill
gamemode
kick
kill
list
locate
locatebiome
me
msg
objective
op
pardon
pardon
Ip
particle
playsound
publish
reload
save
save
All
save
Off
save
On
say
scoreboard
seed
setblock
setidletimeout
setworldspawn
spawnpoint
spectate
spreadplayers
stop
stopsound
summon
teammsg
teleport
tell
tellraw
tm
tp
w
Generated using
TypeDoc
获取上下文对象