Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Contains many types related to manipulating a Minecraft world, including entities, blocks, dimensions, and more.
Changelog
Manifest Details
{
"module_name": "@minecraft/server",
"version": "2.1.0-beta"
}
This is version 2.x.x of this module, which is the latest as of version 1.21.90-beta.26 of Minecraft.
Available Versions
2.1.0-beta
Prior Versions
The following API versions are from a major version that is documented here: @minecraft/server:
1.19.0
1.18.0
1.17.0
1.16.0
1.15.0
1.14.0
1.13.0
1.12.0
1.11.0
1.10.0
1.9.0
1.8.0
1.7.0
1.6.0
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
Enumerations
- AimAssistTargetMode
- BlockComponentTypes
- BlockPistonState
- BlockVolumeIntersection
- ButtonState
- CommandPermissionLevel
- CompoundBlockVolumeAction
- CompoundBlockVolumePositionRelativity
- ContainerRulesErrorReason
- CustomCommandErrorReason
- CustomCommandParamType
- CustomCommandSource
- CustomCommandStatus
- CustomComponentNameErrorReason
- Difficulty
- Direction
- DisplaySlotId
- DyeColor
- EasingType
- EnchantmentSlot
- EntityComponentTypes
- EntityDamageCause
- EntityInitializationCause
- EquipmentSlot
- FluidType
- GameMode
- GameRule
- GraphicsMode
- HudElement
- HudVisibility
- InputButton
- InputMode
- InputPermissionCategory
- ItemComponentTypes
- ItemLockMode
- LiquidSettings
- LiquidType
- MemoryTier
- MoonPhase
- MovementType
- NamespaceNameErrorReason
- ObjectiveSortOrder
- PaletteColor
- PlatformType
- PlayerInventoryType
- PlayerPermissionLevel
- ScoreboardIdentityType
- ScriptEventSource
- SignSide
- StickyType
- StructureAnimationMode
- StructureMirrorAxis
- StructureRotation
- StructureSaveMode
- TimeOfDay
- TintMethod
- WatchdogTerminateReason
- WeatherType
Type Aliases
- BlockComponentReturnType
- BlockComponentTypeMap
- BlockStateArg
- EntityComponentReturnType
- EntityComponentTypeMap
- EntityIdentifierType
- ItemComponentReturnType
- ItemComponentTypeMap
- VanillaEntityIdentifier
Classes
- AimAssistCategory
- AimAssistCategorySettings
- AimAssistPreset
- AimAssistPresetSettings
- AimAssistRegistry
- BiomeType
- BiomeTypes
- Block
- BlockBoundingBoxUtils
- BlockComponent
- BlockComponentEntityFallOnEvent
- BlockComponentOnPlaceEvent
- BlockComponentPlayerBreakEvent
- BlockComponentPlayerInteractEvent
- BlockComponentPlayerPlaceBeforeEvent
- BlockComponentRandomTickEvent
- BlockComponentRegistry
- BlockComponentStepOffEvent
- BlockComponentStepOnEvent
- BlockComponentTickEvent
- BlockCustomComponentInstance
- BlockDestructionParticlesComponent
- BlockEvent
- BlockExplodeAfterEvent
- BlockExplodeAfterEventSignal
- BlockFluidContainerComponent
- BlockInventoryComponent
- BlockLocationIterator
- BlockMapColorComponent
- BlockMovableComponent
- BlockPermutation
- BlockPistonComponent
- BlockRecordPlayerComponent
- BlockSignComponent
- BlockStates
- BlockStateType
- BlockType
- BlockTypes
- BlockVolume
- BlockVolumeBase
- ButtonPushAfterEvent
- ButtonPushAfterEventSignal
- Camera
- ChatSendAfterEvent
- ChatSendAfterEventSignal
- ChatSendBeforeEvent
- ChatSendBeforeEventSignal
- ClientSystemInfo
- CommandResult
- Component
- CompoundBlockVolume
- Container
- ContainerSlot
- CustomCommandOrigin
- CustomCommandRegistry
- CustomComponentParameters
- DataDrivenEntityTriggerAfterEvent
- DataDrivenEntityTriggerAfterEventSignal
- Dimension
- DimensionType
- DimensionTypes
- Effect
- EffectAddAfterEvent
- EffectAddAfterEventSignal
- EffectAddBeforeEvent
- EffectAddBeforeEventSignal
- EffectType
- EffectTypes
- EnchantmentType
- EnchantmentTypes
- Entity
- EntityAddRiderComponent
- EntityAgeableComponent
- EntityAttributeComponent
- EntityBaseMovementComponent
- EntityBreathableComponent
- EntityCanClimbComponent
- EntityCanFlyComponent
- EntityCanPowerJumpComponent
- EntityColor2Component
- EntityColorComponent
- EntityComponent
- EntityDefinitionFeedItem
- EntityDieAfterEvent
- EntityDieAfterEventSignal
- EntityEquippableComponent
- EntityExhaustionComponent
- EntityFireImmuneComponent
- EntityFloatsInLiquidComponent
- EntityFlyingSpeedComponent
- EntityFrictionModifierComponent
- EntityHealableComponent
- EntityHealthChangedAfterEvent
- EntityHealthChangedAfterEventSignal
- EntityHealthComponent
- EntityHitBlockAfterEvent
- EntityHitBlockAfterEventSignal
- EntityHitEntityAfterEvent
- EntityHitEntityAfterEventSignal
- EntityHungerComponent
- EntityHurtAfterEvent
- EntityHurtAfterEventSignal
- EntityInventoryComponent
- EntityIsBabyComponent
- EntityIsChargedComponent
- EntityIsChestedComponent
- EntityIsDyeableComponent
- EntityIsHiddenWhenInvisibleComponent
- EntityIsIgnitedComponent
- EntityIsIllagerCaptainComponent
- EntityIsSaddledComponent
- EntityIsShakingComponent
- EntityIsShearedComponent
- EntityIsStackableComponent
- EntityIsStunnedComponent
- EntityIsTamedComponent
- EntityItemComponent
- EntityLavaMovementComponent
- EntityLeashableComponent
- EntityLoadAfterEvent
- EntityLoadAfterEventSignal
- EntityMarkVariantComponent
- EntityMovementAmphibiousComponent
- EntityMovementBasicComponent
- EntityMovementComponent
- EntityMovementFlyComponent
- EntityMovementGenericComponent
- EntityMovementGlideComponent
- EntityMovementHoverComponent
- EntityMovementJumpComponent
- EntityMovementSkipComponent
- EntityMovementSwayComponent
- EntityNavigationClimbComponent
- EntityNavigationComponent
- EntityNavigationFloatComponent
- EntityNavigationFlyComponent
- EntityNavigationGenericComponent
- EntityNavigationHoverComponent
- EntityNavigationWalkComponent
- EntityNpcComponent
- EntityOnFireComponent
- EntityProjectileComponent
- EntityPushThroughComponent
- EntityRemoveAfterEvent
- EntityRemoveAfterEventSignal
- EntityRemoveBeforeEvent
- EntityRemoveBeforeEventSignal
- EntityRideableComponent
- EntityRidingComponent
- EntitySaturationComponent
- EntityScaleComponent
- EntitySkinIdComponent
- EntitySpawnAfterEvent
- EntitySpawnAfterEventSignal
- EntityStrengthComponent
- EntityTameableComponent
- EntityTameMountComponent
- EntityType
- EntityTypeFamilyComponent
- EntityTypes
- EntityUnderwaterMovementComponent
- EntityVariantComponent
- EntityWantsJockeyComponent
- ExplosionAfterEvent
- ExplosionAfterEventSignal
- ExplosionBeforeEvent
- ExplosionBeforeEventSignal
- FeedItem
- FeedItemEffect
- FluidContainer
- GameRuleChangeAfterEvent
- GameRuleChangeAfterEventSignal
- GameRules
- InputInfo
- ItemCompleteUseAfterEvent
- ItemCompleteUseAfterEventSignal
- ItemCompleteUseEvent
- ItemComponent
- ItemComponentBeforeDurabilityDamageEvent
- ItemComponentCompleteUseEvent
- ItemComponentConsumeEvent
- ItemComponentHitEntityEvent
- ItemComponentMineBlockEvent
- ItemComponentRegistry
- ItemComponentUseEvent
- ItemComponentUseOnEvent
- ItemCompostableComponent
- ItemCooldownComponent
- ItemCustomComponentInstance
- ItemDurabilityComponent
- ItemDyeableComponent
- ItemEnchantableComponent
- ItemFoodComponent
- ItemInventoryComponent
- ItemPotionComponent
- ItemReleaseUseAfterEvent
- ItemReleaseUseAfterEventSignal
- ItemStack
- ItemStartUseAfterEvent
- ItemStartUseAfterEventSignal
- ItemStartUseOnAfterEvent
- ItemStartUseOnAfterEventSignal
- ItemStopUseAfterEvent
- ItemStopUseAfterEventSignal
- ItemStopUseOnAfterEvent
- ItemStopUseOnAfterEventSignal
- ItemType
- ItemTypes
- ItemUseAfterEvent
- ItemUseAfterEventSignal
- ItemUseBeforeEvent
- ItemUseBeforeEventSignal
- ItemUseOnEvent
- LeverActionAfterEvent
- LeverActionAfterEventSignal
- ListBlockVolume
- MessageReceiveAfterEvent
- MolangVariableMap
- PistonActivateAfterEvent
- PistonActivateAfterEventSignal
- Player
- PlayerAimAssist
- PlayerBreakBlockAfterEvent
- PlayerBreakBlockAfterEventSignal
- PlayerBreakBlockBeforeEvent
- PlayerBreakBlockBeforeEventSignal
- PlayerButtonInputAfterEvent
- PlayerButtonInputAfterEventSignal
- PlayerCursorInventoryComponent
- PlayerDimensionChangeAfterEvent
- PlayerDimensionChangeAfterEventSignal
- PlayerEmoteAfterEvent
- PlayerEmoteAfterEventSignal
- PlayerGameModeChangeAfterEvent
- PlayerGameModeChangeAfterEventSignal
- PlayerGameModeChangeBeforeEvent
- PlayerGameModeChangeBeforeEventSignal
- PlayerHotbarSelectedSlotChangeAfterEvent
- PlayerHotbarSelectedSlotChangeAfterEventSignal
- PlayerInputModeChangeAfterEvent
- PlayerInputModeChangeAfterEventSignal
- PlayerInputPermissionCategoryChangeAfterEvent
- PlayerInputPermissionCategoryChangeAfterEventSignal
- PlayerInputPermissions
- PlayerInteractWithBlockAfterEvent
- PlayerInteractWithBlockAfterEventSignal
- PlayerInteractWithBlockBeforeEvent
- PlayerInteractWithBlockBeforeEventSignal
- PlayerInteractWithEntityAfterEvent
- PlayerInteractWithEntityAfterEventSignal
- PlayerInteractWithEntityBeforeEvent
- PlayerInteractWithEntityBeforeEventSignal
- PlayerInventoryItemChangeAfterEvent
- PlayerInventoryItemChangeAfterEventSignal
- PlayerJoinAfterEvent
- PlayerJoinAfterEventSignal
- PlayerLeaveAfterEvent
- PlayerLeaveAfterEventSignal
- PlayerLeaveBeforeEvent
- PlayerLeaveBeforeEventSignal
- PlayerPlaceBlockAfterEvent
- PlayerPlaceBlockAfterEventSignal
- PlayerPlaceBlockBeforeEvent
- PlayerPlaceBlockBeforeEventSignal
- PlayerSpawnAfterEvent
- PlayerSpawnAfterEventSignal
- PotionEffectType
- PotionLiquidType
- PotionModifierType
- Potions
- PressurePlatePopAfterEvent
- PressurePlatePopAfterEventSignal
- PressurePlatePushAfterEvent
- PressurePlatePushAfterEventSignal
- ProjectileHitBlockAfterEvent
- ProjectileHitBlockAfterEventSignal
- ProjectileHitEntityAfterEvent
- ProjectileHitEntityAfterEventSignal
- Scoreboard
- ScoreboardIdentity
- ScoreboardObjective
- ScoreboardScoreInfo
- ScreenDisplay
- ScriptEventCommandMessageAfterEvent
- ScriptEventCommandMessageAfterEventSignal
- Seat
- ServerMessageAfterEventSignal
- ShutdownBeforeEventSignal
- ShutdownEvent
- StartupBeforeEventSignal
- StartupEvent
- Structure
- StructureManager
- System
- SystemAfterEvents
- SystemBeforeEvents
- SystemInfo
- TargetBlockHitAfterEvent
- TargetBlockHitAfterEventSignal
- Trigger
- TripWireTripAfterEvent
- TripWireTripAfterEventSignal
- WatchdogTerminateBeforeEvent
- WatchdogTerminateBeforeEventSignal
- WeatherChangeAfterEvent
- WeatherChangeAfterEventSignal
- WeatherChangeBeforeEvent
- WeatherChangeBeforeEventSignal
- World
- WorldAfterEvents
- WorldBeforeEvents
- WorldLoadAfterEvent
- WorldLoadAfterEventSignal
Interfaces
- BiomeSearchOptions
- BlockBoundingBox
- BlockCustomComponent
- BlockEventOptions
- BlockFillOptions
- BlockFilter
- BlockHitInformation
- BlockRaycastHit
- BlockRaycastOptions
- CameraFadeOptions
- CameraFadeTimeOptions
- CameraFixedBoomOptions
- CameraSetFacingOptions
- CameraSetLocationOptions
- CameraSetPosOptions
- CameraSetRotOptions
- CameraTargetOptions
- CompoundBlockVolumeItem
- ContainerRules
- CustomCommand
- CustomCommandParameter
- CustomCommandResult
- DefinitionModifier
- DimensionLocation
- EaseOptions
- Enchantment
- EntityApplyDamageByProjectileOptions
- EntityApplyDamageOptions
- EntityDamageSource
- EntityDataDrivenTriggerEventOptions
- EntityEffectOptions
- EntityEventOptions
- EntityFilter
- EntityHitInformation
- EntityQueryOptions
- EntityQueryPropertyOptions
- EntityQueryScoreOptions
- EntityRaycastHit
- EntityRaycastOptions
- EqualsComparison
- ExplosionOptions
- GreaterThanComparison
- GreaterThanOrEqualsComparison
- HotbarEventOptions
- InputEventOptions
- InventoryItemEventOptions
- ItemCustomComponent
- JigsawPlaceOptions
- JigsawStructurePlaceOptions
- LessThanComparison
- LessThanOrEqualsComparison
- MusicOptions
- NotEqualsComparison
- PlayAnimationOptions
- PlayerAimAssistSettings
- PlayerSoundOptions
- PotionOptions
- ProjectileShootOptions
- RangeComparison
- RawMessage
- RawMessageScore
- RawText
- RGB
- RGBA
- ScoreboardObjectiveDisplayOptions
- ScriptEventMessageFilterOptions
- SpawnEntityOptions
- StructureCreateOptions
- StructurePlaceOptions
- TeleportOptions
- TitleDisplayOptions
- Vector2
- Vector3
- VectorXZ
- WorldSoundOptions
Errors
- BlockCustomComponentAlreadyRegisteredError
- BlockCustomComponentReloadNewComponentError
- BlockCustomComponentReloadNewEventError
- BlockCustomComponentReloadVersionError
- CommandError
- ContainerRulesError
- CustomCommandError
- CustomComponentInvalidRegistryError
- CustomComponentNameError
- EnchantmentLevelOutOfBoundsError
- EnchantmentTypeNotCompatibleError
- EnchantmentTypeUnknownIdError
- InvalidContainerError
- InvalidContainerSlotError
- InvalidEntityError
- InvalidIteratorError
- InvalidStructureError
- ItemCustomComponentAlreadyRegisteredError
- ItemCustomComponentReloadNewComponentError
- ItemCustomComponentReloadNewEventError
- ItemCustomComponentReloadVersionError
- LocationInUnloadedChunkError
- LocationOutOfWorldBoundariesError
- NamespaceNameError
- PlaceJigsawError
- RawMessageError
- UnloadedChunksError
Constants
HudElementsCount
static read-only HudElementsCount = 13;
Type: number
HudVisibilityCount
static read-only HudVisibilityCount = 2;
Type: number
MoonPhaseCount
static read-only MoonPhaseCount = 8;
Holds the number of MoonPhases
Type: number
TicksPerDay
static read-only TicksPerDay = 24000;
How many times the server ticks in one in-game day.
Type: number
Caution
This property is still in pre-release. Its signature may change or it may be removed in future releases.
TicksPerSecond
static read-only TicksPerSecond = 20;
How many times the server ticks per second of real time.
Type: number
Objects
system
static read-only system: System;
A class that provides system-level events and functions.
Type: System
world
static read-only world: World;
A class that wraps the state of a world - a set of dimensions and the environment of Minecraft.
Type: World