mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-23 06:01:38 -09:00
Merge branch 'main' of https://github.com/eaglerforge/EaglerForgeInjector
This commit is contained in:
commit
93325b59ab
@ -1,5 +1,5 @@
|
||||
(function servermod() {
|
||||
ModAPI.meta.title("Server Manager Mod Thingy");
|
||||
ModAPI.meta.title("Server Manager");
|
||||
ModAPI.meta.version("a0");
|
||||
ModAPI.meta.description("_");
|
||||
ModAPI.meta.credits("ZXMushroom63 & radmanplays");
|
||||
@ -44,6 +44,7 @@
|
||||
function worldUpdate() {
|
||||
if (ModAPI.mc && ModAPI.mc.theWorld) {
|
||||
showgui();
|
||||
openSharedWorld()
|
||||
} else {
|
||||
hidegui();
|
||||
}
|
||||
@ -67,6 +68,22 @@
|
||||
}
|
||||
|
||||
|
||||
function openSharedWorld(){
|
||||
if(ModAPI.mc.theWorld && !ModAPI.hooks.methods.nlevsl_LANServerController_isLANOpen()){
|
||||
ModAPI.hooks.methods.nlevi_PlatformWebRTC_startRTCLANServer();
|
||||
var worldName = ModAPI.mc.thePlayer.getName() + "'s World";
|
||||
var ls = ModAPI.mc.loadingScreen;
|
||||
var code = ModAPI.hooks.methods.nlevsl_LANServerController_shareToLAN(ls.resetProgressAndMessage, worldName, false)
|
||||
if (code != null) {
|
||||
ModAPI.hooks.methods.nlevs_SingleplayerServerController_configureLAN(ModAPI.mc.playerController.getCurrentGameType(), false);
|
||||
alert("code: " + code +" relay: " + ModAPI.hooks.methods.nlevsl_LANServerController_getCurrentURI())
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
NETWORKING OPCODES
|
||||
chat - bidirectional, send chat to server/client
|
||||
|
Loading…
x
Reference in New Issue
Block a user