Index
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
buildrecord component.
C
- 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'sEvents.OnServerCommand(module, command, args). - columns() - Method in interface dev.overlord.zomboidforge.api.storage.Row
-
The names of the stored columns.
- 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 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.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.
- execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.AsyncExecutor
-
Runs
taskon a new virtual thread. - execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.MainThread
-
Runs
taskon the main thread. - execute(Runnable) - Method in interface dev.overlord.zomboidforge.api.ModThread
-
Runs
taskon the mod thread.
F
- forEach(BiConsumer) - Method in interface dev.overlord.zomboidforge.api.storage.Table
-
Calls
actionfor 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
GameVersionrecord class. - get(String) - Method in interface dev.overlord.zomboidforge.api.storage.Row
-
The stored value, or
nullwhen 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. - 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
textis a version prefix forGameVersion.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
majorrecord 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
frominto the current record. - minor() - Method in record class dev.overlord.zomboidforge.api.GameVersion
-
Returns the value of the
minorrecord 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() - Method in class dev.overlord.zomboidforge.api.ClientCommandEvent
O
- onlineId() - Method in record class dev.overlord.zomboidforge.api.PlayerRef
-
Returns the value of the
onlineIdrecord 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
-
listenerruns on the main thread while the event is posted. - onModThread(Class, Consumer) - Method in interface dev.overlord.zomboidforge.api.Events
-
listenerruns 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.
- 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
PlayerRefrecord class.
R
- register(Class) - Method in interface dev.overlord.zomboidforge.api.Commands
-
Registers
command. - 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_casenames. - runLater(int, Runnable) - Method in interface dev.overlord.zomboidforge.api.MainThread
-
Queues
taskto run on the main threadticksframes from now, also when called on the main thread.
S
- schedule(Runnable, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
-
Runs
taskonce afterdelay. - scheduleAtFixedRate(Runnable, Duration, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
-
Runs
taskafterinitialDelay, then everyperiod, measured from the start of each run. - scheduleWithFixedDelay(Runnable, Duration, Duration) - Method in interface dev.overlord.zomboidforge.api.ModThread
-
Runs
taskafterinitialDelay, then againdelayafter each run finished. - 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
valueunderkey, 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
taskon a new virtual thread; the future completes with its result or exception. - submit(Callable) - Method in interface dev.overlord.zomboidforge.api.MainThread
-
Runs
taskon the main thread; the future completes with its result or exception. - submit(Callable) - Method in interface dev.overlord.zomboidforge.api.ModThread
-
Runs
taskon 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
namewith schema version 1 and no migrations. - Table<R> - Interface in dev.overlord.zomboidforge.api.storage
-
Rows of type
R, each under aStringkey. - 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
tickrecord 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
TickEventrecord 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
workin one transaction: writes of this thread inside it are committed together, or not at all whenworkthrows. - transaction(Supplier) - Method in interface dev.overlord.zomboidforge.api.storage.ModStorage
-
Like
ModStorage.transaction(Runnable), returning the result ofwork.
U
- update(String, UnaryOperator, Supplier) - Method in interface dev.overlord.zomboidforge.api.storage.Table
-
Replaces the row under
keywithchangeapplied to it, or toinitialwhen 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
usernamerecord component.
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
All Classes and Interfaces|All Packages|Serialized Form