« Back to search

Mod

Operating System Detector

by TPH · score 0.6 · license: MIT

Operating System Detector

Download latest release

Checks the OS of the device running the mod.

library singleplayer

VERY simple detection for the running device's operating system. Does NOT detect the operating systems of connected clients on a server - as the mod isn't able to access their machines.

Detects operating system via the mod path string (core.get_modpath), but isn't fully reliable. As certain folk can modify how their parent directories work and activate the needed switches in my mod to misidentify. Additionaly, this mod is unable to tell the difference between Linux distros, as well as Linux vs OpenBSD.

Windows, Android, and Linux detection has been tested. However MacOS, iOS, and iPad haven't been tested, nor has the detection for MultiCraft been tested.

This mod should be utilized in singleplayer settings - where a setting should be activated if the player is on a mobile device (Android, iOS, iPad)