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

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() - Method in interface dev.overlord.zomboidforge.api.Subscription
Removes the listener; it receives no further events.
columns() - Method in interface dev.overlord.zomboidforge.api.storage.Row
The names of the stored columns.
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 with a schema version and migrations; 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.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.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.
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

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.

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.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.
isAtLeast(int, int) - Method in record class dev.overlord.zomboidforge.api.GameVersion
 
isBefore(int, int) - Method in record class dev.overlord.zomboidforge.api.GameVersion
 
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
 
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.
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.
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.

O

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.
onModThread(Class, Consumer) - Method in interface dev.overlord.zomboidforge.api.Events
listener runs later on the mod's own thread.
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.

R

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.
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 schema 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 record class dev.overlord.zomboidforge.api.GameVersion
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

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.

V

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