Skip to content

World Functions Document

TRCStudioDean edited this page Jun 3, 2025 · 5 revisions

About

This is some world instance functions based on the BukkitAPI, written based on BukkitAPI/Minecraft 1.16.5, so some properties may not be effective (this feature will continue to be expanded and optimized in the future)
Here's a brief explanation: This type of function is abbreviated as preset function, which only provides preset packaging for some original functions in the Bukkit API. It can specify the effective world and may include more detailed parameter settings.
Basic Format: [WorldName]:[FunctionName]:[Options]...
If the expression already contains a colon : , you can escape it by adding a back slash \ in front to avoid recognizing the segment symbol. (For example \: )

Supplementary explanation

In this document, all options for [Item] can be either the Item ID or the item name in the Item Collection.
In addition, versions below 1.12.2 have special values for some items.
For example, the Golden Apple and the Enchanted Golden Apple are both GOLDEN_APPLE, but if the special value of the regular Golden Apple is 0 and the special value of the Enchanted Golden Apple is 1, then [Item] can be written as [ItemID-SpecialValue].


Preset Functions

Click the function name to view details. The function name and effect are explained by BukkitAPI JavaDoc

Function Name Action
AddPluginChunkTicket Add plugin chunk ticket
CreateExplosion Create an explosion at a designated location
DropItem Drop an item at a designated location
DropItemNaturally Naturally drop an item at a designated location
GenerateTree Generate a tree at a designated location
LoadChunk Load chunk
PlayEffect Play effect
PlaySound Play sound
RemovePluginChunkTicket Remove plugin chunk ticket
RemovePluginChunkTickets Remove all plugin chunk tickets
Save Save data
SetAmbientSpawnLimit Set ambient spawn limit
SetAnimalSpawnLimit Set animal spawn limit
SetAutoSave Set auto save
SetBiome Set biome
SetChunkForceLoaded Set chunk force loaded
SetDifficulty Set difficulty
SetGameRule Set GameRule
SetGameRuleValue Set GameRule (Legacy method)
SetHardcore Set hardcore
SetKeepSpawnInMemory Set keep spawn in memory
SetMonsterSpawnLimit Set monster spawn limit
SetPVP Set PVP
SetSpawnFlags Set spawn flags
SetSpawnLocation Set spawn location
SetStorm Set storm
SetThunderDuration Set thunder duration
SetThundering Set thundering
SetTicksPerAmbientSpawns Set ticks per ambient spawns
SetTicksPerAnimalSpawns Set ticks per animal spawns
SetTicksPerMonsterSpawns Set ticks per monster spawns
SetTicksPerWaterSpawns Set ticks per water spawns
SetTime Set time
SetWaterAmbientSpawnLimit Set water ambient spawn limit
SetWaterAnimalSpawnLimit Set water animal spawn limit
SetWeatherDuration Set weather duration
SpawnArrow Sapwn arrow
SpawnEntity Spawn entity
SpawnFallingBlock Spawn falling block
SpawnParticle Spawn particle
StrikeLightning Strike lightning
StrikeLightningEffect Strike lightning effect
UnloadChunk Unload chunk
UnloadChunkRequest Unload chunk request

AddPluginChunkTicket

Action: Adds a plugin ticket for the specified chunk, loading the chunk if it is not already loaded.
Format: [WorldName]:AddPluginChunkTicket:[X]:[Z]:[Plugin]
Example: 'world:AddPluginChunkTicket:0:0:LiteCommandEditor'

CreateExplosion

Action: Creates explosion at given coordinates with given power and optionally setting blocks on fire or breaking blocks
Format: [WorldName]:CreateExplosion:[X]:[Y]:[Z]:[Power(Number)]:[GenerateFlames(true/false)]:[DestoryBlocks(true/false)]:[CauseBy(PlayerName)]
Example:

  • 'world:CreateExplosion:0:0:0:4' #Generate a level 4 explosion at X=0, Y=0, Z=0 in the world
  • 'world:CreateExplosion:0:0:0:4:true:true' #Generate a level 4 explosion at X=0, Y=0, Z=0 in the world, and this explosion can generate flames and destroy blocks
  • 'world:CreateExplosion:0:0:0:4:true:true:Steve' #Generate a level 4 explosion at X=0, Y=0, Z=0 in the world, and this explosion can generate flames and destroy blocks cause by Steve.

DropItem

Action: Drops an item at the specified Location
Format: [WorldName]:DropItem:[X]:[Y]:[Z]:[Item]
Example: 'world:DropItem:0:0:0:DIAMOND'

DropItemNaturally

Action: Drops an item at the specified Location with a random offset
Format: [WorldName]:DropItemNaturally:[X]:[Y]:[Z]:[Item]
Example: 'world:DropItemNaturally:0:0:0:DIAMOND'

GenerateTree

Action: Creates a tree at the given Location
Tips: Use the command to view a list of tree types: /lce tools listNames sound
Format: [WorldName]:GenerateTree:[X]:[Y]:[Z]:[TreeType]
Example: 'world:GenerateTree:0:0:0:JUNGLE'

LoadChunk

Action: Loads the Chunk at the specified coordinates.
Format: [WorldName]:LoadChunk:[X]:[Z]:[Generate(true/false)]
Example: 'world:LoadChunk:0:0:true'

PlayEffect

Action: Plays an effect to all players within a default radius around a given location.
Tips:

  • [Effect] means sound, particles, etc.
  • Use the command to view a list of effects: /lce tools listNames effects
    Format: [WorldName]:PlayEffect:[X]:[Y]:[Z]:[Effect]:[DataValue]:[Radius]
    Example: 'world:PlayEffect:0:0:0:CLICK1:1:5'

PlaySound

Action: Play a Sound at the provided Location in the World.
Tip: Use the command to view a list of sounds: /lce tools listNames sound
Format: [WorldName]:PlaySound:[X]:[Y]:[Z]:[Sound]:[Volume]:[Pitch]
Example: 'world:PlaySound:0:0:0:UI_BUTTON_CLICK:1:1'

RemovePluginChunkTicket

Action: Removes the specified plugin's ticket for the specified chunk
Format: [WorldName]:RemovePluginChunkTicket:[X]:[Z]:[Plugin]
Example: 'world:RemovePluginChunkTicket:0:0:LiteCommandEditor'

RemovePluginChunkTickets

Action: Removes all plugin tickets for the specified plugin
Format: [WorldName]:RemovePluginChunkTickets:[Plugin]
Example: 'world:RemovePluginChunkTicket:LiteCommandEditor'

Save

Action: Saves world to disk
Format: [WorldName]:Save
Example: 'world:Save'

SetAmbientSpawnLimit

Action: Sets the limit for number of ambient mobs that can spawn in a chunk in this world
Format: [WorldName]:SetAmbientSpawnLimit:[Amount]
Example: 'world:SetAmbientSpawnLimit:10'

SetAnimalSpawnLimit

Action: Sets the limit for number of animals that can spawn in a chunk in this world
Format: [WorldName]:SetAnimalSpawnLimit:[Amount]
Example: 'world:SetAnimalSpawnLimit:10'

SetAutoSave

Action: Sets whether or not the world will automatically save
Format: [WorldName]:SetAutoSave:[true/false]
Example: 'world:SetAutoSave:true'

SetBiome

Action: Sets the biome for the given block coordinates
Note: After the 1.13+MC version, the biome changed to 3-dimensional, and this function may need to re-enter the world to be displayed after executing
Tip: Use the command to view a list of biomes: /lce tools listNames biome
Format:

  • 1.12 and below: [WorldName]:SetBiome:[X]:[Z]:[Biome]
  • 1.13 and above: [WorldName]:SetBiome:[X]:[Y]:[Z]:[Biome] Example: 'world:SetBiome:0:0:0:FOREST'

SetChunkForceLoaded

Action: Sets whether the chunk at the specified chunk coordinates is force loaded.
Format: [WorldName]:SetChunkForceLoaded:[X]:[Z]:[true/false]
Example: 'world:SetChunkForceLoaded:0:0:true'

SetDifficulty

Action: Sets the Difficulty of the world.
Format: [WorldName]:SetDifficulty:[Difficulty]
Tips: Difficulty can be: PEACEFUL, EASY, NORMAL, HARD
Example: 'world:SetDifficulty:EASY'

SetGameRule

Action: Set the given GameRule's new value.
Format: [WorldName]:SetGameRule:[GameRule]:[Value]
Tip: Use the command to view a list of game rules: /lce tools listNames gamerule
Example: 'world:SetGameRule:KEEP_INVENTORY:true'

SetGameRuleValue

Action: Set the given GameRule's new value. (1.12.2 and below)
Format: [WorldName]:SetGameRule:[GameRule]:[Value]
Example: 'world:SetGameRuleValue:KEEP_INVENTORY:true'

SetHardcore

Action: Sets whether the world is hardcore or not. In a hardcore world the difficulty is locked to hard.
Format: [WorldName]:SetHardcore:[true/false]
Example: 'world:SetHardcore:true'

SetKeepSpawnInMemory

Action: Sets whether the world's spawn area should be kept loaded into memory or not.
Format: [WorldName]:SetKeepSpawnInMemory:[true/false]
Example: 'world:SetKeepSpawnInMemory:true'

SetMonsterSpawnLimit

Action: Sets the limit for number of monsters that can spawn in a chunk in this world
Format: [WorldName]:SetMonsterSpawnLimit:[Amount]
Example: 'world:SetMonsterSpawnLimit:10'

SetPVP

Action: Sets the PVP setting for this world.
Format: [WorldName]:SetPVP:[true/false]
Example: 'world:SetPVP:true'

SetSpawnFlags

Action: Sets the spawn flags for this.
Format: [WorldName]:SetSpawnFlags:[true/false]
Example: 'world:SetSpawnFlags:true'

SetSpawnLocation

Action: Sets the spawn location of the world. The location provided must be equal to this world.
Format: [WorldName]:SetSpawnLocation:[X]:[Y]:[Z]:[Yaw]:[Pitch]
Example: 'world:SetSpawnLocation:0:0:0'

SetStorm

Action: Set whether there is a storm. A duration will be set for the new current conditions.
Format: [WorldName]:SetStorm:[true/false]
Example: 'world:SetStorm:true'

SetThunderDuration

Action: Set the thundering duration.
Format: [WorldName]:SetThunderDuration:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetThunderDuration:1200'

SetThundering

Action: Set whether it is thundering.
Format: [WorldName]:SetThundering:[true/false]
Example: 'world:SetThundering:true'

SetTicksPerAmbientSpawns

Action: Sets the world's ticks per ambient mob spawns value
Format: [WorldName]:SetTicksPerAmbientSpawns:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetTicksPerAmbientSpawns:100'

SetTicksPerAnimalSpawns

Action: Sets the world's ticks per animal spawns value
Format: [WorldName]:SetTicksPerAnimalSpawns:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetTicksPerAnimalSpawns:100'

SetTicksPerMonsterSpawns

Action: Sets the world's ticks per monster spawns value
Format: [WorldName]:SetTicksPerMonsterSpawns:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetTicksPerMonsterSpawns:100'

SetTicksPerWaterSpawns

Action: Sets the world's ticks per water mob spawns value
Format: [WorldName]:SetTicksPerWaterSpawns:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetTicksPerWaterSpawns:100'

SetTime

Action: Sets the relative in-game time on the server.
Format: [WorldName]:SetTime:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetTime:6000'

SetWaterAmbientSpawnLimit

Action: Sets the world's ticks per water ambient mob spawns value
Format: [WorldName]:SetWaterAmbientSpawnLimit:[Amount]
Example: 'world:SetWaterAmbientSpawnLimit:50'

SetWaterAnimalSpawnLimit

Action: Sets the limit for number of water animals that can spawn in a chunk in this world
Format: [WorldName]:SetWaterAnimalSpawnLimit:[Amount]
Example: 'world:SetWaterAnimalSpawnLimit:50'

SetWeatherDuration

Action: Set the remaining time in ticks of the current conditions.
Format: [WorldName]:SetWeatherDuration:[Tick]
Tips: 1 second = 20 ticks, it will be affected by server lag
Example: 'world:SetWeatherDuration:24000'

SpawnArrow

Action: Creates an Arrow entity at the given Location
Format: [WorldName]:SpawnArrow:[X]:[Y]:[Z]:[VectorX]:[VectorY]:[VectorZ]:[VelocityValue]:[SpreadValue]
Example: 'world:SpawnArrow:0:0:0:5:5:5:40:1' #Generate an arrow with vector values of X=5, Y=5, Z=5, velocity of 40, and spread value of 1 at X=0, Y=0, Z=0 in the world

SpawnEntity

Action: Creates a entity at the given Location
Format: [WorldName]:SpawnEntity:[X]:[Y]:[Z]:[Entity]
Tip: Use the command to view a list of entity types: /lce tools listNames entitytype
Example: 'world:SpawnEntity:0:0:0:ZOMBIE'

SpawnFallingBlock

Action: Spawn a FallingBlock entity at the given Location of the specified Material. The material dictates what is falling. When the FallingBlock hits the ground, it will place that block.
Format: [WorldName]:SpawnFallingBlock:[X]:[Y]:[Z]:[Item]
Note: [Item] must be a block
Example: 'world:SpawnFallingBlock:0:0:0:GRASS_BLOCK'

SpawnParticle

Action: Spawns the particle (the number of times specified by count) at the target location. The position of each particle will be randomized positively and negatively by the offset parameters on each axis.
Format: [WorldName]:SpawnParticle:[Particle]:[X]:[Y]:[Z]:[Count]:[OffsetX]:[OffsetY]:[OffsetZ]:[ExtraValue]
Tip: Use the command to view a list of particles: /lce tools listNames particle
Example:

  • 'world:SpawnParticle:EXPLOSION_NORMAL:0:0:0:1'
  • 'world:SpawnParticle:EXPLOSION_NORMAL:0:0:0:5:1:1:1'

StrikeLightning

Action: Strikes lightning at the given Location
Format: [WorldName]:StrikeLightning:[X]:[Y]:[Z]
Example: 'world:StrikeLightning:0:0:0'

StrikeLightningEffect

Action: Strikes lightning at the given Location without doing damage
Format: [WorldName]:StrikeLightningEffect:[X]:[Y]:[Z]
Example: 'world:StrikeLightningEffect:0:0:0'

UnloadChunk

Action: Strikes lightning at the given Location without doing damage
Format: [WorldName]:UnloadChunk:[X]:[Z]:[Save(true/false)]
Example: 'world:UnloadChunk:0:0:false'

UnloadChunkRequest

Action: Safely queues the Chunk at the specified coordinates for unloading.
Format: [WorldName]:UnloadChunkRequest:[X]:[Z]
Example: 'world:UnloadChunkRequest:0:0'

Clone this wiki locally