public WorldModule
@NotNull java.lang.String getMapID()
Get current map ID.
@NotNull org.bukkit.Location getLocation(double x, double y, double z, float yaw, float pitch)
Get Location of this world.
x
- X-coordinatey
- Y-coordinatez
- Z-coordinateyaw
- Yaw anglepitch
- Pitch angleMapNotFound
- is thrown if world is not generated yet.@Nullable CoordTag getCoordTag(@NotNull java.lang.String name)
Get class CoordTag
by searching for name
.
One tag can store as many locations as you want. Tags are captured via '/ctag capture' in editor mode.
class CoordTag
,
name
@NotNull org.bukkit.WorldBorder getWorldBorder()
Get WorldBorder of this world.
MapNotFound
- is thrown if world is not generated yet.@Deprecated void setBorderCenter(@NotNull java.lang.String blockTag, int index)
Set center of WorldBorder for this world.
blockTag
- Name of the block coordinate tag which represents the center of border.index
- Index of capture (This is optional).IllegalArgumentException
- is thrown if blockTag
does not indicate a block coordinate in this world.MapNotFound
- is thrown if world is not generated yet.void setDifficulty(@NotNull org.bukkit.Difficulty difficulty)
Set difficulty for every world. (Defaults to Difficulty.NORMAL)
difficulty
- The new difficultyvoid setStormyWeather(boolean storm, boolean thunder)
Set world weather to storm
or not.
storm
- should it rain?thunder
- should it thunder?MapNotFound
- is thrown if world is not generated yet.storm
long getTime(boolean absolute)
absolute
- If true, absolute time is returned. Relative in otherwise.MapNotFound
- is thrown if world is not generated yet.void addTime(long time)
Add up the amount of time
to this world.
MapNotFound
- is thrown if world is not generated yet.time
void setTime(long time, boolean absolute)
Set time for this world.
See World.setTime for relative time.
See World.setFullTime for absolute time.
time
- New time.absolute
- If true, absolute time is returned. Relative in otherwise.MapNotFound
- is thrown if world is not generated yet.void setGameRule(@NotNull java.lang.String rule, @NotNull java.lang.Object value)
Change Minecraft GameRule.
void fillContainers(@NotNull java.lang.String blockTag, @NotNull org.bukkit.loot.LootTable loot)
Fill a container block with loot table.
blockTag
- designates the container location.loot
- describes the contents of items to fill.MapNotFound
- is thrown if world is not generated yet.void fillBlocks(@NotNull java.lang.String tag, @NotNull org.bukkit.Material material)
Fill blocks at the spot pointed by a tag
.
tag
- Name of a Block or Area tagmaterial
- Type of blocks to fillIllegalArgumentException
- is thrown if tag is irrelevant.tag
void placeSchematics(@NotNull java.lang.String tag, @NotNull java.lang.String path, boolean biomes, boolean entities, boolean ignoreAir)
Place blocks by reading a schematic file where the path
points to.
The blocks will be placed relative to the coordinate of tag
.
tag
- The target(s) of blocks to be placed.If tag has multiple captures, the same amount of clones will be generated.path
- Path to schematic file. Root directory is same as where layout.yml resides.biomes
- Whether or not to copy biomes.entities
- Whether or not to copy entities.ignoreAir
- Whether or not to ignore air blocks.MapNotFound
- is thrown if world is not generated yet.path
,
tag