API
Ethereal Plane provides a simple API that can be accessed through the module’s API property.
Accessing the API
Section titled “Accessing the API”The Ethereal Plane API can be accessed using:
game.modules.get('ethereal-plane').apiAPI Reference
Section titled “API Reference”The Ethereal Plane API provides the following methods:
sendMessageToChat(message: string)
Section titled “sendMessageToChat(message: string)”Sends a message to the connected chat platforms.
Parameters:
message(string): The message to send to chat
Example:
// Send a message to chatgame.modules.get('ethereal-plane').api.sendMessageToChat("Hello from Foundry VTT!");Note: This method will only work if the “Allow API” setting is enabled in the module settings.
EtherealPlaneAPI
Section titled “EtherealPlaneAPI”The main API class that provides methods for interacting with the Ethereal Plane module.
export class EtherealPlaneAPI { // Methods sendMessageToChat(message: string);}