-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
42 lines (32 loc) · 1.53 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// <reference types="minecraft-scripting-types-server" />
/*
* * * * * * * * *
* BDSX2 SCRIPT - index.ts *
* by randommouse/madeofstown *
* * * * * * * * * * * * * * * * * * *
* USE/FUNCTION: *
* * Set the console window name and call other custom scripts. *
* * Create ./scripts/ folder and place inside with other custom *
* * scripts to be loaded. *
* * ADD "import './scripts';" TO ./index.ts *
* * * * * * * * * * * * * * * * * * *
*/
import { NativeModule, RawTypeId, VoidPointer } from "bdsx";
// Set Console Window Name * * * *
let windowName = "BDSX - BedrockServer"
// * * * * * * * * * *
const kernel32 = NativeModule.load('Kernel32.dll');
const user32 = NativeModule.load('User32.dll');
const GetConsoleWindow = kernel32.getFunction('GetConsoleWindow', VoidPointer);
const SetWindowText = user32.getFunction('SetWindowTextW', RawTypeId.Void, null, VoidPointer, RawTypeId.StringUtf16);
const wnd = GetConsoleWindow();
SetWindowText(wnd, windowName);
// IMPORT playerlist script
import './playerlist';
// IMPORT playerinit scrip
import './playerinit';
//IMPORT transferserver script
import './transferserver';
//IMPORT tdtp (Transdimentional Teleport) script
import './tdtp';
import './warplist';