Minecraft · handler “Minecraft: Java Edition”
Version 3
Release notes
Fixed file not existing bug
- Released
- Size
- 1.4 KB
- Downloads
- 96
- Check
- Verified
- SHA-256
- 0af4ab94f1e91c66125d720ca506e69fbd3dd718d6dbb4c96179b9d7fa26ec6c
Files 1
| Path | Size |
|---|---|
| handler.js | 3.7 KB |
handler.js
Plain textHub.Handler.Version = 3; // Released at https://hub.splitscreen.me/ on Mon Apr 13 2020 13:02:11 GMT+0000 (UTC).
Hub.Handler.Id = "QC7TTYjjZzaQ6Y6Nw";
Hub.Maintainer.Name = "Ilyaki3100";
Hub.Maintainer.Id = "cFewJZo8fmNxP497J";
Game.NeedsSteamEmulation = false;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = false;
Game.SupportsKeyboard = false;
Game.ExecutableName = "MinecraftLauncher.exe";
Game.SteamID = "15";
Game.GUID = "Minecraft Java Edition";
Game.GameName = "Minecraft Java Edition";
Game.MaxPlayers = 16;
Game.MaxPlayersOneMonitor = 16;
Game.HideTaskbar = true;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Minecraft";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.FakeFocus = true;
Game.FakeFocusInterval = 120;
Game.HookFocus = true;
Game.PreventGameFocus = true;
Game.RefreshWindowAfterStart = true;
Game.ForceProcessPick = true;
Game.NotTopMost = true;
Game.HideCursor = false;
Game.PauseBetweenStarts = 30;
Game.Description =
"Java version only. If you use keyboards and mice after the instances open press the END key to lock the input for all instances to have their own cursor. Press the END key again to unlock the input.";
Game.SupportsMultipleKeyboardsAndMice = true;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookFilterRawInput = true;
Game.HookFilterMouseMessages = true;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;
Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = true;
Game.HookReRegisterRawInputMouse = true;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;
MakeNotReadonly = function(path) {
if (System.IO.File.Exists(path)) {
var oldAttr = System.IO.File.GetAttributes(path);
var newAttr = oldAttr & ~1;
System.IO.File.SetAttributes(path, newAttr);
}
};
MakeReadonly = function(path) {
if (System.IO.File.Exists(path)) {
var oldAttr = System.IO.File.GetAttributes(path);
var newAttr = oldAttr | 1;
System.IO.File.SetAttributes(path, newAttr);
}
};
Game.Play = function() {
var name = "Player" + Context.PlayerID;
var dotm = System.Environment.GetFolderPath(26) + "\\.minecraft";
//Kill any running Minecraft Launchers or they will use the old username.
Context.KillProcessesMatchingWindowName("Minecraft Launcher");
Context.KillProcessesMatchingProcessName("MinecraftLauncher");
//Paths
var lpfp = dotm + "\\launcher_profiles.json";
var uc = dotm + "\\usercache.json";
var unc = dotm + "\\usernamecache.json";
//Mark not readonly
MakeNotReadonly(lpfp);
MakeNotReadonly(uc);
MakeNotReadonly(unc);
//Wipe files
var emptyLines = [];
Context.WriteTextFile(uc, emptyLines);
Context.WriteTextFile(unc, emptyLines);
var usernameLineNumber = Context.FindLineNumberInTextFile(lpfp, '"displayName"', 0);
if (usernameLineNumber != -1) {
var replaceUsernameLine = [usernameLineNumber + "|" + '"displayName" : "' + name + '"'];
Context.ReplaceLinesInTextFile(lpfp, replaceUsernameLine);
}
//Mark readonly
MakeReadonly(lpfp);
MakeReadonly(uc);
MakeReadonly(unc);
};