#!/bin/bash
echo 'on checkTm()	try				delay 15		tell application "System Events"			if name of every process contains "java" is false then				return			end if			tell process "Dock" to tell list 1 to set dockItems to a reference to ¬				(every UI element whose name is "Minecraft")						get value of attribute "AXScreenTimeStatus" of ¬				some UI element in the dockItems		end tell	on error		checkTm()	end tryend checkTmcheckTm()tell application "System Events"	if name of every process contains "java" is true then		display notification "Minecraft time almost up!"		beep		delay 10		try			do shell script "killall java
		 killall launcher"		end try	end ifend tell' | osascript & ~/Library/Application\ Support/minecraft/runtime/jre-legacy/mac-os/jre-legacy/jre.bundle/Contents/Home/bin/java "$@"