A parental control system for Minecraft Java Edition on macOS that limits daily play time with remote approval via Telegram.
- ⏱️ Daily Time Limits - Set different limits for weekdays and weekends
- 📱 One-Tap Telegram Approval - Parents approve time extensions with a single button tap
- 🔐 Fallback Password - Admin password option when Telegram is unavailable
- ⏰ Smart Warnings - 5-minute and 1-minute warnings before time expires
- 🎮 Kid-Friendly UI - Clean GUI dialogs with clear messages
- 🔄 Daily Reset - Time counters reset automatically at midnight
- 💻 Multi-Extension Support - Grant multiple extensions throughout the day
- Time Limit Reached: When daily play time expires, a popup appears
- Request More Time: Child clicks "Ask for More Time"
- Telegram Notification: Parents receive a message with Approve/Deny buttons
- One-Tap Approval: Parents tap "✅ Approve" or "❌ Deny" button
- Instant Response: Child sees result immediately (no code entry needed!)
- Time Granted: If approved, child gets 30 more minutes automatically
- Fallback Option: If denied or timeout, admin password can be used
🎮 MINECRAFT TIME REQUEST
💻 Computer: iMac-Kids
⏰ Time: 15:30
⏱️ Played today: 30 minutes
➕ Extension: 30 minutes
👆 Tap a button to respond:
[✅ Approve 30 min] [❌ Deny]
Child sees:
📱 WAITING FOR PARENT APPROVAL
A message was sent to your parents
with Approve/Deny buttons.
⏳ Waiting for response...
Xcode Command Line Tools are required for this script to work properly. Install them with:
xcode-select --installThis will open a GUI dialog to install the tools. Click "Install" and wait for it to complete.
git clone https://github.com/linaspurinis/minecraft-timer.git
cd minecraft-timer# Copy the example config
cp minertimer.config.example minertimer.config
# Edit the config file
nano minertimer.configRequired settings:
TIME_LIMIT- Weekday limit in seconds (default: 1800 = 30 min)WEEKEND_TIME_LIMIT- Weekend limit in seconds (default: 3600 = 60 min)EXTENSION_TIME- Extension time per request (default: 1800 = 30 min)TELEGRAM_BOT_TOKEN- Your Telegram bot token (see setup below)TELEGRAM_CHAT_ID- Your Telegram chat/group ID
See TELEGRAM_SETUP.md for detailed instructions.
Quick steps:
- Message @BotFather on Telegram
- Create a new bot with
/newbot - Copy the bot token
- Message your bot or add it to a family group
- Get your chat ID from:
https://api.telegram.org/bot<TOKEN>/getUpdates - Add both to
minertimer.config
# Make sure you're in the project directory
cd /path/to/minecraft-timer
# Run the installer with sudo
sudo ./install_minertimer.shsudo launchctl list | grep com.purinis.minecrafttimerYou should see a line with a process ID.
All settings are in minertimer.config:
| Setting | Default | Description |
|---|---|---|
TIME_LIMIT |
1800 | Weekday time limit (seconds) |
WEEKEND_TIME_LIMIT |
3600 | Weekend time limit (seconds) |
EXTENSION_TIME |
1800 | Extension time per approval (seconds) |
DISPLAY_5_MIN_WARNING |
true | Show 5-minute warning |
DISPLAY_1_MIN_WARNING |
true | Show 1-minute warning |
REQUIRE_ADMIN_PASSWORD |
true | Enable password fallback |
ENABLE_TELEGRAM_AUTH |
true | Enable Telegram authentication |
TELEGRAM_BOT_TOKEN |
"" | Your Telegram bot token |
TELEGRAM_CHAT_ID |
"" | Your Telegram chat ID |
Test the authentication flow without waiting for the timer:
./test_telegram.shThis will:
- Send a real Telegram message with a code
- Show all GUI dialogs
- Let you test correct/incorrect codes
- Test the fallback password option
Approve Time Extension:
- Receive Telegram message with inline buttons
- Tap "✅ Approve" to grant time (or "❌ Deny" to decline)
- Done! The system responds instantly
Remotely Monitor:
- All requests show computer name, time, and current play time
- Works from anywhere you have Telegram access
- One-tap approval from your phone
- Full audit trail in Telegram chat
- Each message updates to show "APPROVED" or "DENIED" status
When Time Expires:
- Popup appears: "Time Limit Reached"
- Click "Ask for More Time"
- Message is sent to parents
- Wait for parent to approve (you'll see a waiting dialog)
- Get 30 more minutes automatically when approved!
Tips:
- No code to enter - parents approve with a button tap
- Request will timeout after 5 minutes if no response
- If denied or timeout, you can ask a parent for the admin password
- Check warnings - you get alerts at 5 min and 1 min remaining
sudo ./uninstall_minertimer.shOr manually:
# Stop the service
sudo launchctl unload /Library/LaunchDaemons/com.purinis.minecrafttimer.plist
# Remove files
sudo rm /Library/LaunchDaemons/com.purinis.minecrafttimer.plist
sudo rm -rf /Users/Shared/minertimer
sudo rm -rf /var/lib/minertimer- Check bot token and chat ID are correct
- Make sure you've sent at least one message to your bot
- For groups, check the chat ID has a minus sign (e.g.,
-123456789) - Test with:
./test_telegram.sh
# Check if daemon is running
sudo launchctl list | grep com.purinis.minecrafttimer
# Check normal logs (script output)
tail -f /var/log/minertimer.log
# Check error logs (if something goes wrong)
tail -f /var/log/minertimer.error.log- Make sure Minecraft Java Edition is running (not Bedrock)
- Check the process name matches "Minecraft" in Activity Monitor
# Unload (stop)
sudo launchctl unload /Library/LaunchDaemons/com.purinis.minecrafttimer.plist
# Load (start)
sudo launchctl load -w /Library/LaunchDaemons/com.purinis.minecrafttimer.plistminertimer.sh- Main timer scriptminertimer.config.example- Example configuration fileminertimer.config- Your actual config (not in git, copy from .example)install_minertimer.sh- Installation scriptuninstall_minertimer.sh- Uninstallation scripttest_telegram.sh- Test script for authentication flowcom.purinis.minecrafttimer.plist- LaunchDaemon configurationTELEGRAM_SETUP.md- Detailed Telegram setup guide
- Config file (
minertimer.config) is in.gitignore- never commit it - Config file permissions are set to
600(owner read/write only) - Telegram bot token should be kept secret
- Admin password uses macOS's native authentication
- macOS (tested on macOS 10.15+)
- Minecraft Java Edition
- Administrator account for installation
- Telegram account (optional, for remote approval)
MIT License - see LICENSE file for details
Copyright (c) 2025 Linas Purinis
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
- Original concept and foundation by Soferio Pty Limited