Liking cljdoc? Tell your friends :D
Clojure only.

lambdaisland.witchcraft

Clojure API for Minecraft/Bukkit

Clojure API for Minecraft/Bukkit
raw docstring

*default-world*clj

source

-set-blockcljmultimethod

Server-specific set-block implementation

Server-specific set-block implementation
sourceraw docstring

-set-blockscljmultimethod

source

-set-directioncljmultimethod

source

active-itemclj

(active-item player)
source

active-potion-effectsclj

(active-potion-effects player)
source

addclj

(add this that)
(add this that & more)

Add multiple vector/location-like things together. Returns a value with the same type of the first argument.

Add multiple vector/location-like things together.
Returns a value with the same type of the first argument.
sourceraw docstring

add-inventoryclj

(add-inventory has-inventory item)
(add-inventory has-inventory item n)

Add the named item to the player or entity's inventory, or n copies of it

Add the named item to the player or entity's inventory, or n copies of it
sourceraw docstring

allow-flightclj

(allow-flight player)
(allow-flight player bool)
source

blockclj

(block block-or-loc)

Get the block at the given location, returns a Clojure map. See get-block if you need the actual block object.

Get the block at the given location, returns a Clojure map. See [[get-block]]
if you need the actual block object.
sourceraw docstring

block-actionsclj

Map from keyword to block.Action value

Map from keyword to block.Action value
sourceraw docstring

block-dataclj

(block-data b)
source

block-faceclj

(block-face kw)

Coerce to BlockFace

Use to convert keywords like :east/:west/:self to BlockFace instances. Idempotent.

Coerce to BlockFace

Use to convert keywords like :east/:west/:self to BlockFace instances. Idempotent.
sourceraw docstring

block-face-namesclj

Map from BlockFace value to keyword

Map from BlockFace value to keyword
sourceraw docstring

block-facesclj

Map from keyword to BlockFace value

Map from keyword to BlockFace value
sourceraw docstring

block-setclj

(block-set coll)
(block-set xform coll)

Create a block set, a set of maps where every :x/:y/:z value can only occur once.

Create a block set, a set of maps where every :x/:y/:z value can only occur
once.
sourceraw docstring

blockvclj

(blockv block-or-loc)

Like block, but return a vector instead of a map. Contains in order: x,y,z,material, and optionally a direction and/or a block-data map (or block-data integer pre-flattening). Generally the same structure as can be passed to set-blocks.

Like [[block]], but return a vector instead of a map. Contains in order:
x,y,z,material, and optionally a direction and/or a block-data map (or
block-data integer pre-flattening). Generally the same structure as can be
passed to [[set-blocks]].
sourceraw docstring

break-naturallyclj

(break-naturally block-like)
(break-naturally block-like tool-or-effect)
(break-naturally block-like tool effect?)

Breaks the block and spawns items, can optionally take a tool argument, as if a player had digged the block with that specific tool (ItemStack, or something that can be coerced to an item-stack or material, like a keyword). Optionally also takes an effect? boolean, which determines whether to play the block break particle effect and sound.

effect? is not supported on all implementations.

Breaks the block and spawns items, can optionally take a `tool` argument, as if
a player had digged the block with that specific tool (`ItemStack`, or
something that can be coerced to an item-stack or material, like a keyword).
Optionally also takes an `effect?` boolean, which determines whether to play
the block break particle effect and sound.

`effect?` is not supported on all implementations.
sourceraw docstring

build!clj

Alias for [[set-blocks]], for symmetry with [[lambdaisland.witchcraft.cursor/build!]]
sourceraw docstring

CanBreakNaturallycljprotocol

-break-naturallyclj

(-break-naturally _)
source

CanBreakNaturallyEffectcljprotocol

-break-naturally-effectclj

(-break-naturally-effect _ effect)
source

CanBreakNaturallyToolcljprotocol

-break-naturally-toolclj

(-break-naturally-tool _ tool)
source

CanBreakNaturallyToolEffectcljprotocol

-break-naturally-tool-effectclj

(-break-naturally-tool-effect _ tool effect?)
source

CanParseBlockDatacljprotocol

-parse-block-dataclj

(-parse-block-data _ _)
source

CanRenderDisplayNamecljprotocol

-render-and-set-display-nameclj

(-render-and-set-display-name _ _)
source

CanSpawncljprotocol

-spawnclj

(-spawn thing location)
source

clear-weatherclj

(clear-weather)
(clear-weather world)

Get clear weather

Get clear weather
sourceraw docstring

contentsclj

(contents o)

Get the contents of the inventory of something as a sequence of maps.

Get the contents of the inventory of something as a sequence of maps.
sourceraw docstring

create-explosionclj

(create-explosion loc-like)
(create-explosion loc-like strength)

Create an explosion at a certain location, with a given explosion size (default: 5)

Create an explosion at a certain location, with a given explosion size (default: 5)
sourceraw docstring

create-worldclj

(create-world name opts)

Create a new world with a given name and options

  • :seed long
  • :structures? boolean
  • :hardcore? boolean
Create a new world with a given name and options

- :seed long
- :structures? boolean
- :hardcore? boolean
sourceraw docstring

default-worldclj

(default-world)

World used for commands when no explicit world is given. Uses *default-world*, or the first world on the server.

World used for commands when no explicit world is given.
Uses [[*default-world*]], or the first world on the server.
sourceraw docstring

defprintclj

(defprint type tag to-edn)
source

despawnclj

(despawn entity)

Remove an entity from the world

Remove an entity from the world
sourceraw docstring

difficultyclj

(difficulty)
(difficulty the-world)

Get the difficulty of the world (keyword, World instance, or anything coercible by world)

Get the difficulty of the world (keyword, World instance, or anything coercible by [[world]])
sourceraw docstring

difficulty-typesclj

Map from keyword to Difficulty

Map from keyword to Difficulty
sourceraw docstring

directionclj

(direction block-or-loc)

Get the direction of a Block, or of the block at a certain location.

Get the direction of a Block, or of the block at a certain location.
sourceraw docstring

display-nameclj

(display-name o)

Get the display-name for an item, itemstack, itemmeta, or nameable block or blockstate.

Get the display-name for an item, itemstack, itemmeta, or nameable block or blockstate.
sourceraw docstring

distanceclj

(distance this that)

Get the euclidian distance between two locations. Can take various bukkit objects (Location, Block, Vector), as well as Clojure vectors [x y z] or maps {:x x :y y :z z}, and any combination thereof.

Get the euclidian distance between two locations. Can take various bukkit
objects (Location, Block, Vector), as well as Clojure vectors `[x y z]` or
maps `{:x x :y y :z z}`, and any combination thereof.
sourceraw docstring

empty-inventoryclj

(empty-inventory entity)

Clear out the inventory

Clear out the inventory
sourceraw docstring

EMPTY_BLOCK_SETclj

Make sure there is only one block for each coordinate in the set, and keep them sorted by x/z/y.

Make sure there is only one block for each coordinate in the set, and keep them
sorted by x/z/y.
sourceraw docstring

enchant-typesclj

Map from keyword to Enchantment

Map from keyword to Enchantment
sourceraw docstring

enchantmentclj

(enchantment o)
source

enchantment-keyclj

(enchantment-key e)
source

entityclj

(entity o)

Get an object's entity, or get entity by UUID.

Get an object's entity, or get entity by UUID.
sourceraw docstring

entity-typesclj

Map from keyword to EntityType value

Map from keyword to EntityType value
sourceraw docstring

eye-heightclj

(eye-height e)
source

eye-locationclj

(eye-location e)
source

fast-forwardclj

(fast-forward time)
(fast-forward world time)

Fast forward the clock, time is given in ticks, with 20 ticks per second, or 24000 ticks in a Minecraft day.

Fast forward the clock, time is given in ticks, with 20 ticks per second, or
24000 ticks in a Minecraft day.
sourceraw docstring

fly!clj

(fly!)
(fly! player)

Set a player as allowing flight and flying. Note: doesn't seem to actually cause flying, but it does make flying possible.

Set a player as allowing flight and flying.
Note: doesn't seem to actually cause flying, but it does make flying
possible.
sourceraw docstring

fly-speedclj

(fly-speed player)
source

food-levelclj

(food-level player)

Get the player's food level, a number between 0 and 20

Get the player's food level, a number between 0 and 20
sourceraw docstring

game-modeclj

(game-mode)
(game-mode player)

Get the current game mode

Get the current game mode
sourceraw docstring

game-modesclj

source

get-blockclj

(get-block loc)

Get the block at a given location. Idempotent.

Get the block at a given location. Idempotent.
sourceraw docstring

get-block-dataclj

(get-block-data b)
source

get-inventoryclj

(get-inventory o)

Get the org.bukkit.inventory.Inventory for the given object/entity. Works for players, blocks (e.g. chests), itemstacks (e.g. shulker box in inventory), etc.

Get the org.bukkit.inventory.Inventory for the given object/entity. Works for
players, blocks (e.g. chests), itemstacks (e.g. shulker box in inventory),
etc.
sourceraw docstring

get-target-blockclj

(get-target-block entity)
(get-target-block entity transparent)
(get-target-block entity transparent max-distance)

Get the target block in the line of sight of the entity/player, as org.bukkit.block.Block

Get the target block in the line of sight of the entity/player, as org.bukkit.block.Block
sourceraw docstring

HasBlockcljprotocol

-blockclj

(-block _)
source

HasBlockDatacljprotocol

-get-block-dataclj

(-get-block-data _)

-set-block-dataclj

(-set-block-data _ _)
source

HasBlockStatecljprotocol

-block-stateclj

(-block-state _)
source

HasCustomNamecljprotocol

-get-custom-nameclj

(-get-custom-name _)

-set-custom-nameclj

(-set-custom-name _ _)
source

HasDifficultycljprotocol

-get-difficultyclj

(-get-difficulty _)

-set-difficultyclj

(-set-difficulty _ d)
source

HasDisplayNamecljprotocol

-display-nameclj

(-display-name _)

-set-display-nameclj

(-set-display-name _ _)
source

HasEntitycljprotocol

-entityclj

(-entity _)
source

HasInventorycljprotocol

-inventoryclj

(-inventory _)
source

HasItemMetacljprotocol

-item-metaclj

(-item-meta _)

-set-item-metaclj

(-set-item-meta _ _)
source

HasItemStackcljprotocol

-item-stackclj

(-item-stack _)
source

HasLocationcljprotocol

-locationclj

(-location _)

Get the location of the given object

Get the location of the given object
source

HasLorecljprotocol

-loreclj

(-lore _)

-set-loreclj

(-set-lore _ _)
source

HasMaterialcljprotocol

-materialclj

(-material _)
source

HasPitchYawcljprotocol

-pitchclj

(-pitch _)

-yawclj

(-yaw _)
source

HasPlayercljprotocol

-playerclj

(-player _)
source

HasTargetBlockcljprotocol

-get-target-blockclj

(-get-target-block _ transparent max-distance)
source

HasUUIDcljprotocol

-uuidclj

(-uuid _)
source

HasWorldcljprotocol

-worldclj

(-world _)
(-world _ _)
source

HasWorldscljprotocol

-world-by-nameclj

(-world-by-name _ _)

-world-by-uuidclj

(-world-by-uuid _ _)

-worldsclj

(-worlds _)
source

HasXYZcljprotocol

-xclj

(-x _)

-yclj

(-y _)

-zclj

(-z _)
source

healthclj

(health player)

Get the player's health, a number between 0 and 20

Get the player's health, a number between 0 and 20
sourceraw docstring

highest-block-atclj

(highest-block-at loc)

Retrieve the highest block at the given location

Retrieve the highest block at the given location
sourceraw docstring

in-front-ofcljdeprecated

(in-front-of loc)
(in-front-of loc n)

Get the location n blocks in front of the given location, based on the location's direction. Polymorphic, can work with most things that have a location. Returns plain data.

Get the location `n` blocks in front of the given location, based on the
location's direction. Polymorphic, can work with most things that have a
location. Returns plain data.
sourceraw docstring

init-xmaterial!clj

(init-xmaterial!)

We can only access the XMaterial class once a Bukkit server is available

We can only access the XMaterial class once a Bukkit server is available
sourceraw docstring

into-inventoryclj

(into-inventory has-inventory items)

Add multiple items to an inventory at once

Add multiple items to an inventory at once
sourceraw docstring

inventoryclj

(inventory i)

Get a Clojure/EDN representation of an inventory (or of something that has an inventory). Has :type and :contents keys, and :size for chest type inventories (others have a fixed size).

Get a Clojure/EDN representation of an inventory (or of something that has an
inventory). Has `:type` and `:contents` keys, and `:size` for chest type
inventories (others have a fixed size).
sourceraw docstring

inventory-typeclj

(inventory-type i)

Get the type of an inventory object, or of something that has an inventory (like a player or chest entity) as a keyword.

Get the type of an inventory object, or of something that has an
inventory (like a player or chest entity) as a keyword.
sourceraw docstring

inventory-typesclj

source

item-in-handclj

(item-in-hand entity)
source

item-in-hand-countclj

(item-in-hand-count entity)
source

item-in-hand-typeclj

(item-in-hand-type entity)
source

item-metaclj

(item-meta o)

Get the ItemMeta for an item or compatible object, this object contains things like the display name of the item, if it has been renamed.

Get the ItemMeta for an item or compatible object, this object contains things
like the display name of the item, if it has been renamed.
sourceraw docstring

item-stackclj

(item-stack o)
(item-stack material count)

Create (from a material) or get (from something that has an item-stack) an ItemStack object

Create (from a material) or get (from something that has an item-stack) an
ItemStack object
sourceraw docstring

listen!clj

(listen! event k f)

Listen for an event

Event is a keyword based on the event type, like :player-interact or :item-spawn, k`` is a key this event is registered under, so you canunlisten!` with the same key afterwards. Re-registering a listener with the same event and key will replace the old listener.

See (keyslambdaisland.witchcraft.events/events) for all known events.

Listen for an event

Event is a keyword based on the event type, like `:player-interact` or
`:item-spawn`, `k`` is a key this event is registered under, so you can
`unlisten!` with the same key afterwards. Re-registering a listener with the
same event and key will replace the old listener.

See `(keys `[[lambdaisland.witchcraft.events/events]]`)` for all known
events.
sourceraw docstring

locclj

(loc obj)

Get the location of a thing, as a clojure map. Can take most objects that have some kind of location, e.g. Location, Player, Vector, Block, Entity. Can also take Clojure maps or vectors, so you can use it to coerce input of unknown type.

Get the location of a thing, as a clojure map. Can take most objects that have
some kind of location, e.g. Location, Player, Vector, Block, Entity. Can also
take Clojure maps or vectors, so you can use it to coerce input of unknown
type.
sourceraw docstring

Locationclj

source

locationclj

(location o)

Get the location of the given object

Get the location of the given object
sourceraw docstring

locvclj

source

loreclj

(lore o)

Get the lore for an item or compatible object.

Get the lore for an item or compatible object.
sourceraw docstring

make-inventoryclj

(make-inventory {:keys [owner type size title contents] :or {size 27}})

Make a new Bukkit inventory object, with either :type (keyword) or :size (must be multiple of 9), and optional :owner and/or :title.

Make a new Bukkit inventory object, with either `:type` (keyword) or
`:size` (must be multiple of 9), and optional `:owner` and/or `:title`.
sourceraw docstring

map->blockdataclj

(map->blockdata _ _)
source

matclj

(mat m)

Get the material name of something, as a keyword.

Get the material name of something, as a keyword.
sourceraw docstring

materialclj

(material m)

Get the org.bukkit.Material for the given object.

  • map: looks for a :material key
  • vector: will look for a keyword in the fourth position (so you can use `[x y z material]``)
  • keyword: looks up the named material
  • Objects that implement getMaterial() or getType(), use the object method to get the material
  • location-like things: pass on to get-block to get the material at that location
Get the `org.bukkit.Material` for the given object.

- map: looks for a `:material` key
- vector: will look for a keyword in the fourth position
  (so you can use `[x y z material]``)
- keyword: looks up the named material
- Objects that implement `getMaterial()` or `getType()`, use
  the object method to get the material
- location-like things: pass on to `get-block` to get the
  material at that location
sourceraw docstring

material-nameclj

(material-name m)

Get the material name of something, as a keyword. Alias for mat.

Get the material name of something, as a keyword. Alias for [[mat]].
sourceraw docstring

material-namesclj

Map from XMaterial value to keyword

Map from XMaterial value to keyword
sourceraw docstring

materialsclj

Map from keyword to XMaterial value

Map from keyword to XMaterial value
sourceraw docstring

nearby-entitiesclj

(nearby-entities entity x y z)
source

normalize-textclj

(normalize-text txt)

When dealing with text which contains §-based color and markup codes, "normalize" it by setting it on an item and reading back the result. This will cause the server to strip out redundant markup. Useful if you later want to use equality checks on the name of items.

Can also take hiccup-like markup as per lambdaisland.witchcraft.markup

When dealing with text which contains `§`-based color and markup codes,
"normalize" it by setting it on an item and reading back the result. This
will cause the server to strip out redundant markup. Useful if you later want
to use equality checks on the name of items.

Can also take hiccup-like markup as per [[lambdaisland.witchcraft.markup]]
sourceraw docstring

online-playersclj

(online-players)

List all online players

List all online players
sourceraw docstring

open-inventoryclj

(open-inventory target)
(open-inventory target inventory)

Open the inventory UI, pass it a player and the inventory to show.

Open the inventory UI, pass it a player and the inventory to show.
sourceraw docstring

pitchclj

(pitch o)
source

playerclj

(player)
(player name)

Get a player by name, or simply the first player found.

Get a player by name, or simply the first player found.
sourceraw docstring

player-chunkclj

(player-chunk player)

Return the chunk the player is in

Return the chunk the player is in
sourceraw docstring

pluginclj

For the rare API calls that really want a plugin instance

For the rare API calls that really want a plugin instance
sourceraw docstring

plugin-managerclj

(plugin-manager)

Get the Bukkit plugin manager

Get the Bukkit plugin manager
sourceraw docstring

PolymorphicFunctionscljprotocol

-addclj

(-add this that)

Add locations, vectors, etc. That can also be a map of :x, :y, :z

Add locations, vectors, etc. That can also be a map of `:x`, `:y`, `:z`

as-vecclj

(as-vec _)

Coerce to org.bukkit.util.Vector

Coerce to org.bukkit.util.Vector

chunkclj

(chunk _)

Retrieve the chunk for a location, entity, etc.

Retrieve the chunk for a location, entity, etc.

direction-vecclj

(direction-vec _)

entitiesclj

(entities _)

Get the chunk's entities

Get the chunk's entities

material-dataclj

(material-data _)

with-xyzclj

(with-xyz _ xyz)

Return the same type, but with x/y/z updated

Return the same type, but with x/y/z updated
source

pre-flattening?clj

(pre-flattening?)
source

redo!clj

(redo!)

Redo the last build that was undone with undo!

Redo the last build that was undone with [[undo!]]
sourceraw docstring

redo-historyclj

source

remove-inventoryclj

(remove-inventory has-inventory item)
(remove-inventory has-inventory item n)

Remove the named items from the player or entity's inventory, or n copies of it

Remove the named items from the player or entity's inventory, or n copies of
it
sourceraw docstring

render-markupclj

Render hiccup-like markup into a string with color and styling codes that Minecraft understand, see the lambdaisland.witchcraft.markup namespace for details.

Render hiccup-like markup into a string with color and styling codes that Minecraft understand, see the [[lambdaisland.witchcraft.markup]] namespace for details.
sourceraw docstring

run-taskclj

(run-task f)

Schedule a task for the next server tick

Schedule a task for the next server tick
sourceraw docstring

run-task-laterclj

(run-task-later f ticks)

Schedule a task for after n ticks

Schedule a task for after n ticks
sourceraw docstring

satisfies-cacheclj

source

satisfies?clj

(satisfies? protocol x)

Like clojure.core/satisfies?, but cache the result. We make heavy use of satisfies, and this is not very well optimized in core.

Like clojure.core/satisfies?, but cache the result. We make heavy use of
satisfies, and this is not very well optimized in core.
sourceraw docstring

schedulerclj

(scheduler)

The Bukkit scheduler

The Bukkit scheduler
sourceraw docstring

send-messageclj

(send-message p message)

Send a chat message to a specific player

Takes strings or vectors (markup), e.g.

[:red "hello " [:underline "world"]]

See [[markup/codes]].

Send a chat message to a specific player

Takes strings or vectors (markup), e.g.

```
[:red "hello " [:underline "world"]]
```

See [[markup/codes]].
sourceraw docstring

send-titleclj

(send-title p title)
(send-title p title subtitle)

Send a title and optionally subtitle to the player

Titles are splashed in big type over the middle of the screen, before they fade out.

Takes strings or vectors (markup), e.g.

[:red "hello " [:underline "world"]]

See [[markup/codes]].

Send a title and optionally subtitle to the player

Titles are splashed in big type over the middle of the screen, before they
fade out.

Takes strings or vectors (markup), e.g.

```
[:red "hello " [:underline "world"]]
```

See [[markup/codes]].
sourceraw docstring

serverclj

(server)

Get the currently active server.

Get the currently active server.
sourceraw docstring

server-typeclj

source

set-bed-spawn-locationclj

(set-bed-spawn-location player loc)
(set-bed-spawn-location player loc force?)

Set the location where the player will respawn, set force? to true to update the spawn location even if there is no valid bed available.

Set the location where the player will respawn, set `force?` to true to update
the spawn location even if there is no valid bed available.
sourceraw docstring

set-blockclj

(set-block loc-or-map)
(set-block loc material-or-map)

Set the block at a specific location to a specific material

material can be a keyword (see materials), a String like RED_WOOL or WOOL:14, a bukkit Material, a Bukkit ItemStack, or an xseries XMaterial.

Single-arity version takes a map with :x/:y/:z/:world/:material/:material-data/:block-data (some optional)

Two-arity version takes something that is or has a location (can also be a vector or map), and a material or map with :material/:direction/:block-data.

Set the block at a specific location to a specific material

`material` can be a keyword (see [[materials]]), a String like `RED_WOOL` or
`WOOL:14`, a bukkit Material, a Bukkit ItemStack, or an xseries XMaterial.

Single-arity version takes a map with
`:x`/`:y`/`:z`/`:world`/`:material`/`:material-data`/`:block-data` (some
optional)

Two-arity version takes something that is or has a location (can also be a
vector or map), and a material or map with
`:material`/`:direction`/`:block-data`.
sourceraw docstring

set-block-dataclj

(set-block-data block prop-map)
(set-block-data block mat prop-map)

Set BlockData properties, these are material dependent, e.g. slabs can have {:type :top} or {:type :bottom}.

We need to get a matching Material object to construct the correct type of BlockData, if you already have one handy you should pass it in to prevent an extra lookup.

Set `BlockData` properties, these are material dependent, e.g. slabs can have
`{:type :top}` or `{:type :bottom}`.

We need to get a matching `Material` object to construct the correct type of
`BlockData`, if you already have one handy you should pass it in to prevent an
extra lookup.
sourceraw docstring

set-blocksclj

(set-blocks blocks)
(set-blocks blocks
            {:keys [keep-history? start anchor palette material]
             :or {keep-history? true}})

Set blocks in bulk

Takes a sequence of maps with :x, :y, :z, :material, and optionally :world and :data, or a sequence of [x y z material] vectors. Alternatively you can pass a sequence of any object that responds to the x, y, z, and material-name methods.

This adds an entry to the undo history, capturing the previous state of the blocks it is changing, so you can undo! and then redo! the result, unless :keep-history? is set to false.

Optionally takes an :start or :anchor option, which then offsets the whole structure by that distance (can be a map, vector, Location, bukkit Vector, etc.), so you can define the structure you are passing in independently of its position in the world.

Can take a :palette, which is a map with material name aliases (keyword to keyword, or keyword to [keyword map] pair, to provide block-data).

Currently only optimized on Glowstone, elsewhere it repeatedly calls set-block, so changing really large amounts of blocks at once will incur significant lag.

Set blocks in bulk

Takes a sequence of maps with `:x`, `:y`, `:z`, `:material`, and optionally
`:world` and `:data`, or a sequence of `[x y z material]` vectors.
Alternatively you can pass a sequence of any object that responds to the `x`,
`y`, `z`, and `material-name` methods.

This adds an entry to the undo history, capturing the previous state of the
blocks it is changing, so you can [[undo!]] and then [[redo!]] the result,
unless `:keep-history?` is set to `false`.

Optionally takes an `:start` or `:anchor` option, which then offsets the whole
structure by that distance (can be a map, vector, `Location`, bukkit `Vector`,
etc.), so you can define the structure you are passing in independently of its
position in the world.

Can take a `:palette`, which is a map with material name aliases (keyword to
keyword, or keyword to [keyword map] pair, to provide block-data).

Currently only optimized on Glowstone, elsewhere it repeatedly
calls [[set-block]], so changing really large amounts of blocks at once will
incur significant lag.
sourceraw docstring

set-contentsclj

(set-contents inv items)

Set inventory contents on an inventory or something that has an inventory.

Set inventory contents on an inventory or something that has an inventory.
sourceraw docstring

set-difficultyclj

(set-difficulty level)
(set-difficulty the-world level)

Set the world's difficulty (keyword)

Set the world's difficulty (keyword)
sourceraw docstring

set-directionclj

(set-direction loc dir)

Set the direction of a block, takes a keyword or BlockFace, see block-faces

Set the direction of a block, takes a keyword or BlockFace,
see [[block-faces]]
sourceraw docstring

set-display-nameclj

(set-display-name o name)

Set the display-name on an item, itemstack, itemmeta. Takes a list (sequence) of strings, or of markup vectors as per lambdaisland.witchcraft.markup/render.

Set the display-name on an item, itemstack, itemmeta. Takes a list (sequence)
of strings, or of markup vectors as
per [[lambdaisland.witchcraft.markup/render]].
sourceraw docstring

set-fly-speedclj

(set-fly-speed player speed)
source

set-food-levelclj

(set-food-level player food-level)

Set the player's food level, a number between 0 and 20

Set the player's food level, a number between 0 and 20
sourceraw docstring

set-game-modeclj

(set-game-mode player mode)

Sets the game mode for the player, takes a keyword or a org.bukkit.GameMode, see game-modes

Sets the game mode for the player, takes a keyword or a `org.bukkit.GameMode`,
see [[game-modes]]
sourceraw docstring

set-healthclj

(set-health player health)

Set the player's health, a number between 0 and 20

Set the player's health, a number between 0 and 20
sourceraw docstring

set-item-metaclj

(set-item-meta o im)

Set the ItemMeta for compatible objects, like an ItemStack. Either takes an actual ItemMeta object, or a map with :name and/or :lore keys.

Set the ItemMeta for compatible objects, like an ItemStack. Either takes an
actual ItemMeta object, or a map with `:name` and/or `:lore` keys.
sourceraw docstring

set-loreclj

(set-lore o lore)

Set the lore on an item, itemstack, itemmeta. Takes a list (sequence) of strings, or of markup vectors as per lambdaisland.witchcraft.markup/render.

Set the lore on an item, itemstack, itemmeta. Takes a list (sequence) of
strings, or of markup vectors as per [[lambdaisland.witchcraft.markup/render]].
sourceraw docstring

set-timeclj

(set-time time)
(set-time world time)

Set the time in a world, or the first world on the current server. Time is given in ticks, with 20 ticks per second, or 24000 ticks in a Minecraft day.

Set the time in a world, or the first world on the current server.
Time is given in ticks, with 20 ticks per second, or 24000 ticks in a
Minecraft day.
sourceraw docstring

spawnclj

(spawn loc entity-or-npc)

Spawn a new entity

Spawn a new entity
sourceraw docstring

start-glowstone!clj

(start-glowstone! & args)

Start an embedded Glowstone server

Optionally provided with a map of config options. See [[lambdaisland.witchcraft.config/key-values]]

Start an embedded Glowstone server

Optionally provided with a map of config options.
See [[lambdaisland.witchcraft.config/key-values]]
sourceraw docstring

start-paper!clj

(start-paper! & [gui?])

Start an embedded PaperMC server

Start an embedded PaperMC server
sourceraw docstring

stop!clj

(stop!)

Stop the embedded server

Stop the embedded server
sourceraw docstring

target-blockclj

(target-block & args)

Get the target block in the line of sight of the entity/player, as a map

Get the target block in the line of sight of the entity/player, as a map
sourceraw docstring

teleportclj

(teleport loc)
(teleport entity l)

Teleport to a given location

Teleport to a given location
sourceraw docstring

timeclj

(time)
(time world)

Get the current time in the world in ticks.

Get the current time in the world in ticks.
sourceraw docstring

tree-speciesclj

Map from keyword to TreeSpecies value

Map from keyword to TreeSpecies value
sourceraw docstring

undo!clj

(undo!)

Undo the last build. Can be repeated to undo multiple builds.

Undo the last build. Can be repeated to undo multiple builds.
sourceraw docstring

undo-historyclj

source

unlisten!clj

(unlisten! event k)

Remove an event listener

Remove an event listener
sourceraw docstring

vec3clj

(vec3 x y z)

Create a org.bukkit.util.Vector instance

Create a org.bukkit.util.Vector instance
sourceraw docstring

worldclj

(world o)
(world o n)

Get the world associated with a given object, or look up a world by string or UUID.

Get the world associated with a given object, or look up a world by string or
UUID.
sourceraw docstring

world-creatorclj

(world-creator name opts)
source

worldsclj

(worlds)
(worlds o)

Get a list of all worlds on the server

Get a list of all worlds on the server
sourceraw docstring

xclj

(x o)
source

xmaterialclj

(xmaterial m)

Get an XMaterial instance from a keyword, string, Material, or ItemStack, or anything else for which the polymorphic material method is implemented.

This is a shim class which provides version-independent material handling.

Get an XMaterial instance from a keyword, string, Material, or ItemStack, or
anything else for which the polymorphic [[material]] method is implemented.

This is a shim class which provides version-independent material handling.
sourceraw docstring

xyzclj

(xyz o)

Get the x/y/z values of an object as a vector, can work with maps containing :x/:y/:z keys, or virtually any Glowstone object that encodes or has a location.

Get the x/y/z values of an object as a vector, can work with maps containing
`:x`/`:y`/`:z` keys, or virtually any Glowstone object that encodes or has a
location.
sourceraw docstring

xyz-roundclj

(xyz-round o)

Like xyz, but returns rounded integers.

Like [[xyz]], but returns rounded integers.
sourceraw docstring

xyz1clj

(xyz1 o)

Like xyz, but add an extra 1 at the end, for affine transformations

Like [[xyz]], but add an extra `1` at the end, for affine transformations
sourceraw docstring

yclj

(y o)
source

yawclj

(yaw o)
source

zclj

(z o)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close