# README
- English
- 中文
Script
We use goja as our javascript engine.
Goja support full ES5, but it DOES NOT support full ES6 yet.
Please read their Features and Known incompatibilities to see what you can use and what you cannot
Setup
Lazy setup
npm init glp@latest "<plugin-name>"
Note: Typescript will be automaticly configured.
Manually setup
You may want to configure your project manually, then you have to do the commands below
-
Install go-liter-plugin:
npm install go-liter-plugin
-
Add the following element to your
tsconfig.json
{ "compilerOptions": { "typeRoots": [ "node_modules/@types", "node_modules/go-liter-plugin" ] } }
Typescript
Check files under ./types/lib/ for more information
Events
There is a list of events on each object below
$
Event Name | Description | Consequences after called cancel() |
---|---|---|
unload | The unload event for the plugin | N/A |
handshake | Client sent the handshake packet | Abort client to connect to the target server, but allows the scripts to handle packet event on the connection. |
serve | The server connection is success | Abort to use native directly copy, but allows the scripts to handle packet event on the connection. |
Conn
Event Name | Description | Consequences after called cancel() |
---|---|---|
packet | Received a minecraft packet | Prevent this packet to be forward |
error | An error occurred on the connection | N/A |
close | Connection closed | N/A |
before_close | The other connection of the pair closed | This connection will not be closed. |
# Packages
No description provided by the author
# Functions
No description provided by the author
NewEvent will create a cancelable event.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Version returns the version of liter plugin engine This is the version of "go-liter-plugin" when building the package.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
TODO JsonStorage is a local storage, it's thready-safe.
No description provided by the author
MemoryStorage is designed for single thread use, so it's not thread-safe.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author