Skip to content

Commit fd2d29a

Browse files
committed
add tutorial
1 parent 61ef9cf commit fd2d29a

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default defineConfig({
2727
text: 'Getting started',
2828
collapsed: false,
2929
items: [
30+
{ text: 'How to Install Mods', link: '/apidocs/how-to-install-mods' },
3031
{ text: 'Introduction', link: '/apidocs/' },
3132
// ...
3233
],
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# How to install mods
2+
3+
1. Open the compiled client
4+
2. click the "Mods" button in the main menu or the pause menu
5+
3. click "Add New" to install a mod from a url or click "Upload" to upload a Mod
6+
7+
heres a example mod to test this out with:
8+
9+
url : https://raw.githubusercontent.com/eaglerforge/eaglerforge.github.io/main/docs/example.js
10+
11+
the code inside of the example mod :
12+
```
13+
function runCode() {
14+
if (document.pointerLockElement != null){//if pointerlock is enabled (the player is in game)
15+
ModAPI.displayToChat({msg: "hello"})
16+
ModAPI.displayToChat({msg: "welcome to eaglerforge!"})
17+
}
18+
}
19+
var intervalId = setInterval(runCode, 50);//run the code in a loop
20+
```

0 commit comments

Comments
 (0)