Index

A B C D E F G H I K L M O P R S T U V Z 
All Classes and Interfaces|All Packages|Serialized Form

A

args() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 
async() - Method in class dev.overlord.zomboidforge.api.Mod
Virtual threads for blocking work such as HTTP calls or file I/O.
async() - Method in interface dev.overlord.zomboidforge.api.ModContext
Virtual threads for blocking work such as HTTP calls or file I/O.
AsyncExecutor - Interface in dev.overlord.zomboidforge.api
Virtual threads for a mod's blocking work, such as HTTP calls or file I/O: one thread per task, named zf-async-<id>-<n>.

B

bind(Class) - Method in interface dev.overlord.zomboidforge.api.ModConfig
Creates a record from the settings.
build() - Method in record class dev.overlord.zomboidforge.api.GameVersion
Returns the value of the build record component.

C

cancel() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.OnClientCommand
Cancels the event before the method runs, so Lua's OnClientCommand does not receive the command, also when the method throws.
cancel() - Method in interface dev.overlord.zomboidforge.api.Cancellable
Prevents the default action.
cancel() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 
cancel() - Method in interface dev.overlord.zomboidforge.api.Subscription
Removes the listener; it receives no further events.
Cancellable - Interface in dev.overlord.zomboidforge.api
An event whose default action, what Project Zomboid does after the event, can be prevented.
ClientCommandEvent - Class in dev.overlord.zomboidforge.api
A client command arrived: a client called Lua's sendClientCommand(module, command, args).
ClientCommandEvent(PlayerRef, String, String, Map) - Constructor for class dev.overlord.zomboidforge.api.ClientCommandEvent
 
clientCommands() - Method in class dev.overlord.zomboidforge.api.Mod
Server commands to clients, received by their Lua mods.
clientCommands() - Method in interface dev.overlord.zomboidforge.api.ModContext
Server commands to clients, received by their Lua mods.
ClientCommands - Interface in dev.overlord.zomboidforge.api
Server commands to clients, the reply channel to ClientCommandEvent: a client receives them in Lua's Events.OnServerCommand(module, command, args).
columns() - Method in interface dev.overlord.zomboidforge.api.storage.Row
The names of the stored columns.
command() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.OnClientCommand
The command, matched exactly; empty matches every command of the module.
command() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 
commands() - Method in class dev.overlord.zomboidforge.api.Mod
Admin command registration.
commands() - Method in interface dev.overlord.zomboidforge.api.ModContext
Admin command registration.
Commands - Interface in dev.overlord.zomboidforge.api
Registration of admin commands.
compareTo(GameVersion) - Method in record class dev.overlord.zomboidforge.api.GameVersion
 
config() - Method in class dev.overlord.zomboidforge.api.Mod
The mod's settings from config.toml.
config() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's settings from config.toml.
contains(String) - Method in interface dev.overlord.zomboidforge.api.storage.Table
 
count() - Method in interface dev.overlord.zomboidforge.api.storage.Table
 

D

define(String, Class) - Method in interface dev.overlord.zomboidforge.api.storage.ModStorage
A table to open with a schema version and migrations, starting from those of Schema and Migrate on type; see TableDefinition.
delete(String) - Method in interface dev.overlord.zomboidforge.api.storage.Table
 
deleteAll(Collection) - Method in interface dev.overlord.zomboidforge.api.storage.Table
 
dev.overlord.zomboidforge.api - package dev.overlord.zomboidforge.api
 
dev.overlord.zomboidforge.api.annotations - package dev.overlord.zomboidforge.api.annotations
Annotations that stand for calls a mod can also make through the services of Mod.
dev.overlord.zomboidforge.api.storage - package dev.overlord.zomboidforge.api.storage
Per-world storage for mods: record tables in a SQLite database next to the save, kept apart by mod id.
directory() - Method in class dev.overlord.zomboidforge.api.Mod
The mod's folder, <forge>/mods/<id>.
directory() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's folder, <forge>/mods/<id>.

E

equals(Object) - Method in record class dev.overlord.zomboidforge.api.GameVersion
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class dev.overlord.zomboidforge.api.PlayerRef
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class dev.overlord.zomboidforge.api.TickEvent
Indicates whether some other object is "equal to" this one.
Event - Interface in dev.overlord.zomboidforge.api
Something that happened in the server, delivered to listeners registered with Events.
events() - Method in class dev.overlord.zomboidforge.api.Mod
Event listener registration.
events() - Method in interface dev.overlord.zomboidforge.api.ModContext
Event listener registration.
Events - Interface in dev.overlord.zomboidforge.api
Registration of event listeners.
Every - Annotation Interface in dev.overlord.zomboidforge.api.annotations
EveryNTicks - Annotation Interface in dev.overlord.zomboidforge.api.annotations
Runs the method on the main thread every n-th frame of the main loop: a TickEvent listener for the ticks that EveryNTicks.value() divides (n, 2n, ...).
execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.AsyncExecutor
Runs task on a new virtual thread.
execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.MainThread
Runs task on the main thread.
execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.ModThread
Runs task on the mod thread.

F

fixedDelay() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Every
false: the period counts from the start of each run (fixed rate); true: from the end of each run (fixed delay).
forEach(BiConsumer) - Method in interface dev.overlord.zomboidforge.api.storage.Table
Calls action for every row, sorted by key, without loading all rows at once.
from() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Migrate
The stored schema version this method migrates from; at least 1.

G

gameVersion() - Method in class dev.overlord.zomboidforge.api.Mod
The running Project Zomboid version.
gameVersion() - Method in interface dev.overlord.zomboidforge.api.ModContext
The running Project Zomboid version.
GameVersion - Record Class in dev.overlord.zomboidforge.api
Project Zomboid version, e.g.
GameVersion(int, int, int) - Constructor for record class dev.overlord.zomboidforge.api.GameVersion
Creates an instance of a GameVersion record class.
get(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
The stored value, or null when it is null.
get(String) - Method in interface dev.overlord.zomboidforge.api.storage.Table
 
get(String, Class) - Method in interface dev.overlord.zomboidforge.api.ModConfig
The value at a dotted path, e.g.
getAll(Collection) - Method in interface dev.overlord.zomboidforge.api.storage.Table
The rows of the given keys that exist.
getBoolean(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
 
getBytes(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
 
getDouble(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
 
getLong(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
 
getString(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
 

H

hashCode() - Method in record class dev.overlord.zomboidforge.api.GameVersion
Returns a hash code value for this object.
hashCode() - Method in record class dev.overlord.zomboidforge.api.PlayerRef
Returns a hash code value for this object.
hashCode() - Method in record class dev.overlord.zomboidforge.api.TickEvent
Returns a hash code value for this object.

I

id() - Method in class dev.overlord.zomboidforge.api.Mod
The id from mod.toml.
id() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's id from mod.toml.
initialDelay() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Every
The time before the first run, at least 0.
isAtLeast(int, int) - Method in record class dev.overlord.zomboidforge.api.GameVersion
 
isBefore(int, int) - Method in record class dev.overlord.zomboidforge.api.GameVersion
 
isCancelled() - Method in interface dev.overlord.zomboidforge.api.Cancellable
 
isCancelled() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 
isMainThread() - Method in interface dev.overlord.zomboidforge.api.MainThread
Whether the calling thread is the main thread.
isModThread() - Method in interface dev.overlord.zomboidforge.api.ModThread
Whether the calling thread is this mod thread.
isPrefix(String) - Static method in record class dev.overlord.zomboidforge.api.GameVersion
Whether text is a version prefix for GameVersion.matches(String): "42", "42.21", or "42.21.0".

K

key() - Method in interface dev.overlord.zomboidforge.api.storage.Row
 
Key - Annotation Interface in dev.overlord.zomboidforge.api.annotations
The key of a record component, instead of the one converted from its name (maxBalance to max_balance): the config.toml key for ModConfig.bind(Class), the column name for ModStorage tables.
keys() - Method in interface dev.overlord.zomboidforge.api.storage.Table
Every key, sorted.

L

logger() - Method in class dev.overlord.zomboidforge.api.Mod
Logger whose messages go into the Project Zomboid log, marked with the mod's id.
logger() - Method in interface dev.overlord.zomboidforge.api.ModContext
Logger whose messages go into the Project Zomboid log, marked with the mod's id.

M

main() - Method in class dev.overlord.zomboidforge.api.Mod
The server's main thread, for everything that touches game objects.
main() - Method in interface dev.overlord.zomboidforge.api.ModContext
The server's main thread, for everything that touches game objects.
MainThread - Interface in dev.overlord.zomboidforge.api
Runs a mod's code on the server's main thread, which owns every game object.
MainThreadEvent - Interface in dev.overlord.zomboidforge.api
An event that carries live game state or only makes sense during the tick.
major() - Method in record class dev.overlord.zomboidforge.api.GameVersion
Returns the value of the major record component.
matches(String) - Method in record class dev.overlord.zomboidforge.api.GameVersion
Whether this version starts with prefix: "42" matches every 42.x.y, "42.21" every 42.21.x, "42.21.0" only 42.21.0.
Max - Annotation Interface in dev.overlord.zomboidforge.api.annotations
The largest value a numeric component of a configuration record accepts; see Min.
migrate(int, Function) - Method in interface dev.overlord.zomboidforge.api.storage.TableDefinition
How to turn a row stored with schema version from into the current record.
Migrate - Annotation Interface in dev.overlord.zomboidforge.api.annotations
A migration of a storage record, as TableDefinition.migrate(int, Function) adds one: turns a row stored with schema version Migrate.from() into the record.
Min - Annotation Interface in dev.overlord.zomboidforge.api.annotations
The smallest value a numeric component of a configuration record accepts.
minor() - Method in record class dev.overlord.zomboidforge.api.GameVersion
Returns the value of the minor record component.
Mod - Class in dev.overlord.zomboidforge.api
Base class of every mod.
Mod() - Constructor for class dev.overlord.zomboidforge.api.Mod
 
ModConfig - Interface in dev.overlord.zomboidforge.api
Settings of one mod: <forge>/mods/<id>/config.toml, over the defaults in the mod's jar (META-INF/zomboidforge/config.toml).
ModContext - Interface in dev.overlord.zomboidforge.api
What ZomboidForge provides to one mod.
ModStorage - Interface in dev.overlord.zomboidforge.api.storage
The mod's tables in zomboidforge.db, next to the world's save.
modThread() - Method in class dev.overlord.zomboidforge.api.Mod
The mod's own platform thread, zf-mod-<id>: one task at a time, in order.
modThread() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's own platform thread, zf-mod-<id>: one task at a time, in order.
ModThread - Interface in dev.overlord.zomboidforge.api
The mod's own platform thread, zf-mod-<id>: runs one task at a time, in the order they were submitted.
module() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.OnClientCommand
The Lua module, matched exactly; not blank.
module() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 

O

OnClientCommand - Annotation Interface in dev.overlord.zomboidforge.api.annotations
Registers the method with Events.onMain(Class, Consumer) for the ClientCommandEvents of one module, and optionally one command.
onlineId() - Method in record class dev.overlord.zomboidforge.api.PlayerRef
Returns the value of the onlineId record component.
onLoad() - Method in class dev.overlord.zomboidforge.api.Mod
Called once on the main thread, after the instance is created.
onMain(Class, Consumer) - Method in interface dev.overlord.zomboidforge.api.Events
listener runs on the main thread while the event is posted.
OnMain - Annotation Interface in dev.overlord.zomboidforge.api.annotations
Registers the method with Events.onMain(Class, Consumer) for the event type of its only parameter.
onModThread(Class, Consumer) - Method in interface dev.overlord.zomboidforge.api.Events
listener runs later on the mod's own thread.
OnModThread - Annotation Interface in dev.overlord.zomboidforge.api.annotations
Registers the method with Events.onModThread(Class, Consumer) for the event type of its only parameter.
onServerStarted() - Method in class dev.overlord.zomboidforge.api.Mod
Called once on the main thread, after the world is loaded, the network port is open, and RCON is initialized; directly before the main loop starts.
onStopping() - Method in class dev.overlord.zomboidforge.api.Mod
Called once on the shutdown thread when the server stops, before the world is saved.
open() - Method in interface dev.overlord.zomboidforge.api.storage.TableDefinition
Creates the table, or checks the stored one against the record and migrates it.

P

parse(String) - Static method in record class dev.overlord.zomboidforge.api.GameVersion
Parses "42.21.0", or "42.21" as 42.21.0.
player() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
The player who sent the command.
PlayerRef - Record Class in dev.overlord.zomboidforge.api
A connected player, by value: usable on any thread and after the player left.
PlayerRef(int, String) - Constructor for record class dev.overlord.zomboidforge.api.PlayerRef
Creates an instance of a PlayerRef record class.

R

register(Class) - Method in interface dev.overlord.zomboidforge.api.Commands
Registers command.
register(Object) - Method in interface dev.overlord.zomboidforge.api.Events
Registers the methods of listener annotated with OnMain, OnModThread, or OnClientCommand, as Events.onMain(Class, Consumer) and Events.onModThread(Class, Consumer) do, and schedules those annotated with Every or EveryNTicks.
RegisterCommand - Annotation Interface in dev.overlord.zomboidforge.api.annotations
Registers the class as an admin command, as Commands.register(Class) does, while the mod loads: after the entry point's listener methods and before Mod.onLoad().
Row - Interface in dev.overlord.zomboidforge.api.storage
One row of a table in its stored form, given to migrations: the key and the columns by their snake_case names.
runLater(int, Runnable) - Method in interface dev.overlord.zomboidforge.api.MainThread
Queues task to run on the main thread ticks frames from now, also when called on the main thread.

S

schedule(Runnable, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
Runs task once after delay.
scheduleAtFixedRate(Runnable, Duration, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
Runs task after initialDelay, then every period, measured from the start of each run.
scheduleWithFixedDelay(Runnable, Duration, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
Runs task after initialDelay, then again delay after each run finished.
Schema - Annotation Interface in dev.overlord.zomboidforge.api.annotations
The schema version of a storage record, read by ModStorage.table(String, Class) and ModStorage.define(String, Class); TableDefinition.version(int) overrides it.
send(PlayerRef, String, String, Map) - Method in interface dev.overlord.zomboidforge.api.ClientCommands
Sends a command to player.
sendToAll(String, String, Map) - Method in interface dev.overlord.zomboidforge.api.ClientCommands
Sends a command to every connected client.
set(String, R) - Method in interface dev.overlord.zomboidforge.api.storage.Table
Stores value under key, replacing an existing row.
setAll(Map) - Method in interface dev.overlord.zomboidforge.api.storage.Table
Stores every entry in one transaction.
storage() - Method in class dev.overlord.zomboidforge.api.Mod
The mod's tables in the world's zomboidforge.db; not on the main thread once the server runs.
storage() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's tables in the world's zomboidforge.db.
StorageException - Exception Class in dev.overlord.zomboidforge.api.storage
A storage operation failed: a database error, or a table that does not match its record.
StorageException(String) - Constructor for exception class dev.overlord.zomboidforge.api.storage.StorageException
 
StorageException(String, Throwable) - Constructor for exception class dev.overlord.zomboidforge.api.storage.StorageException
 
submit(Callable) - Method in interface dev.overlord.zomboidforge.api.AsyncExecutor
Runs task on a new virtual thread; the future completes with its result or exception.
submit(Callable) - Method in interface dev.overlord.zomboidforge.api.MainThread
Runs task on the main thread; the future completes with its result or exception.
submit(Callable) - Method in interface dev.overlord.zomboidforge.api.ModThread
Runs task on the mod thread; the future completes with its result or exception.
Subscription - Interface in dev.overlord.zomboidforge.api
A registered event listener.

T

table(String, Class) - Method in interface dev.overlord.zomboidforge.api.storage.ModStorage
Opens the table name with the schema version and migrations that type declares with Schema and Migrate; without them, version 1 and no migrations.
Table<R> - Interface in dev.overlord.zomboidforge.api.storage
Rows of type R, each under a String key.
TableDefinition<R> - Interface in dev.overlord.zomboidforge.api.storage
A table to open with a schema version and migrations.
tick() - Method in record class dev.overlord.zomboidforge.api.TickEvent
Returns the value of the tick record component.
TickEvent - Record Class in dev.overlord.zomboidforge.api
Posted on the main thread once per frame of the main loop, before the queued main-thread tasks run.
TickEvent(long) - Constructor for record class dev.overlord.zomboidforge.api.TickEvent
Creates an instance of a TickEvent record class.
toString() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
 
toString() - Method in record class dev.overlord.zomboidforge.api.GameVersion
Returns a string representation of this record class.
toString() - Method in record class dev.overlord.zomboidforge.api.PlayerRef
Returns a string representation of this record class.
toString() - Method in record class dev.overlord.zomboidforge.api.TickEvent
Returns a string representation of this record class.
transaction(Runnable) - Method in interface dev.overlord.zomboidforge.api.storage.ModStorage
Runs work in one transaction: writes of this thread inside it are committed together, or not at all when work throws.
transaction(Supplier) - Method in interface dev.overlord.zomboidforge.api.storage.ModStorage
Like ModStorage.transaction(Runnable), returning the result of work.

U

unit() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Every
The unit of Every.value() and Every.initialDelay(): MILLIS, SECONDS, MINUTES, HOURS, or DAYS.
update(String, UnaryOperator, Supplier) - Method in interface dev.overlord.zomboidforge.api.storage.Table
Replaces the row under key with change applied to it, or to initial when there is none, in one transaction: no other write comes in between.
username() - Method in record class dev.overlord.zomboidforge.api.PlayerRef
Returns the value of the username record component.

V

value() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Every
The period, at least 1.
value() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.EveryNTicks
n, at least 1.
value() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Key
 
value() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Max
 
value() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Min
 
version() - Element in annotation interface dev.overlord.zomboidforge.api.annotations.Schema
At least 1.
version() - Method in class dev.overlord.zomboidforge.api.Mod
The version from mod.toml.
version() - Method in interface dev.overlord.zomboidforge.api.ModContext
The mod's version from mod.toml.
version(int) - Method in interface dev.overlord.zomboidforge.api.storage.TableDefinition
Schema version of the record, at least 1.
VERSION - Static variable in class dev.overlord.zomboidforge.api.ZomboidForge
Build version, from the manifest of the jar these classes were loaded from.

Z

ZomboidForge - Class in dev.overlord.zomboidforge.api
 
A B C D E F G H I K L M O P R S T U V Z 
All Classes and Interfaces|All Packages|Serialized Form