Liking cljdoc? Tell your friends :D

lambdaisland.witchcraft

Clojure API for Glowstone

Clojure API for Glowstone
raw docstring

add-inventoryclj

(add-inventory player item)
(add-inventory player item n)

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

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

block-actionsclj

Map from keyword to block.Action value

Map from keyword to block.Action value
sourceraw docstring

block-facesclj

Map from keyword to BlockFace value

Map from keyword to BlockFace value
sourceraw docstring

boxclj

(box loc [w h d] type)

Draw a box with width, height, depth of a certain block type

Draw a box with width, height, depth of a certain block type
sourceraw docstring

chunk-managerclj

(chunk-manager)
(chunk-manager world)

Get the world's chunk manager

Get the world's chunk manager
sourceraw docstring

clear-weatherclj

(clear-weather)

Get clear weather

Get clear weather
sourceraw docstring

create-serverclj

(create-server config)

Create a new GlowServer based on a config

This also sets the static worldConfig field via reflection. When creating a server directly like this (instead of via createFromArguments) this otherwise doesn't get set.

Create a new GlowServer based on a config

This also sets the static worldConfig field via reflection. When creating a
server directly like this (instead of via `createFromArguments`) this
otherwise doesn't get set.
sourceraw docstring

empty-inventoryclj

(empty-inventory player)
source

entitiesclj

Map from keyword to EntityType value

Map from keyword to EntityType value
sourceraw docstring

fast-forwardclj

(fast-forward 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

game-modeclj

(game-mode)
(game-mode player)

Get the current game mode

Get the current game mode
sourceraw docstring

get-blockclj

(get-block loc)

Get the block at a given location

Get the block at a given location
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-ofclj

(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.

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.
sourceraw docstring

init-registrations!clj

(init-registrations!)

Perform some internal wiring for Glowstone. This populates several global (static) registries

Perform some internal wiring for Glowstone. This populates several
global (static) registries
sourceraw docstring

inventoryclj

(inventory player)

Get the player's inventory

Get the player's inventory
sourceraw docstring

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-stackclj

(item-stack material count)

Create an ItemStack object

Create 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

Locationclj

source

material-namesclj

Map from Material to keyword

Map from Material to keyword
sourceraw docstring

materialsclj

Map from keyword to Material value

Map from keyword to Material value
sourceraw docstring

nearby-entitiesclj

(nearby-entities entity x y z)
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

playersclj

(players)

List all online players

List all online players
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

xclj

(x _)

distanceclj

(distance this that)

Get the distance between locations/vectors/entities

Get the distance between locations/vectors/entities

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`

locationclj

(location _)
(location _ n)

Get the location of the given object, or n blocks in front of it.

Get the location of the given object, or `n` blocks in front of it.

directionclj

(direction _)

yclj

(y _)

yawclj

(yaw _)

pitchclj

(pitch _)

as-vecclj

(as-vec _)

Coerce to Vector

Coerce to Vector

worldclj

(world _)

Get the world for a player, by its name, by UUID, etc.

Get the world for a player, by its name, by UUID, etc.

zclj

(z _)

materialclj

(material _)
source

remove-inventoryclj

(remove-inventory player item)
(remove-inventory player item n)

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

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

reset-globals!clj

(reset-globals!)

Glowstone and Bukkit keep tons of globals, do our best to unset/reset them so it's possible to restart a server without restarting the process.

Glowstone and Bukkit keep tons of globals, do our best to unset/reset them so
it's possible to restart a server without restarting the process.
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

schedulerclj

(scheduler)

The Bukkit scheduler

The Bukkit scheduler
sourceraw docstring

send-messageclj

(send-message player msg)

Send a message to a player

Send a message to a player
sourceraw docstring

serverclj

(server)

Get the currently active server.

Get the currently active server.
sourceraw docstring

set-blockclj

(set-block loc material)
(set-block loc material data)

Set the block at a specific location to a specific material

Set the block at a specific location to a specific material
sourceraw docstring

set-block-directionclj

(set-block-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-blocksclj

(set-blocks blocks)

Optimized way to set multiple blocks, takes a sequence of maps with :x, :y, :z, :material, and optionally :world and :data.

Optimized way to set multiple blocks, takes a sequence of maps
with :x, :y, :z, :material, and optionally :world and :data.
sourceraw docstring

spawnclj

(spawn loc entity)

Spawn a new entity

Spawn a new entity
sourceraw docstring

start!clj

(start!)
(start! opts)

Start a server, optionally provided with a map of config options. See [[lambdaisland.witchcraft.config/key-values]]

Start a server, optionally provided with a map of config options. See [[lambdaisland.witchcraft.config/key-values]]
sourceraw docstring

stop!clj

(stop!)
source

storageclj

(storage)

Get the world's storage

Get the world's storage
sourceraw docstring

teleportclj

(teleport loc)
(teleport entity loc)

Teleport to a given location

Teleport to a given location
sourceraw docstring

tree-speciesclj

Map from keyword to TreeSpecies value

Map from keyword to TreeSpecies value
sourceraw docstring

unlisten!clj

(unlisten! event k)

Remove an event listener

Remove an event listener
sourceraw docstring

vec3clj

(vec3 x y z)

Create a vector instance

Create a vector instance
sourceraw docstring

worldsclj

(worlds)
(worlds s)

Get all worlds on the server

Get all worlds on the server
sourceraw docstring

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

× close