介绍
🇬🇧 English
⏱ Player Time Limit Mod
PlayerTimeLimit is a server-side (not client-side) Minecraft mod for Fabric that allows setting daily playtime limits per player, resetting them daily, and managing this time through commands and a public API. Perfect for educational, family, or controlled-play servers.
📌 Features
- ⏳ Configurable daily time per player.
- ⚠️ Customizable warnings before time runs out.
- 📤 Automatic kick when time ends.
- 🔁 Automatic daily reset based on timezone.
- 💬 Customizable messages.
- 🧠 Offline player support (UUID cached).
- 📊 Informative BossBar on screen.
- 🔒 Permissions support with LuckPerms.
- 📦 Public API for other mods.
🧪 Commands
All commands start with /plt and support player autocompletion, even if they are offline.
/plt check <player> # Shows remaining time
/plt info <player> # Shows detailed status (time, paused, depleted)
/plt addtime <player> <sec> # Adds time to player
/plt removetime <player> <sec> # Removes time from player
/plt resettime <player> # Resets time to default value
/plt pause <player> # Pauses player's time counter
/plt resume <player> # Resumes time counter
/plt reload # Reloads YAML configuration file
🔐 LuckPerms Permissions
Each command requires specific permissions which you can assign using plugins like LuckPerms:
| Permission | Description |
|————————————–|—————————————-|
| PLimitTime.admin | Access to all commands |
| PLimitTime.command.check | View player time and info |
| PLimitTime.command.addtime | Add time to players |
| PLimitTime.command.removetime | Remove time from players |
| PLimitTime.command.resettime | Reset player time |
| PLimitTime.command.pause | Pause a player’s time |
| PLimitTime.command.resume | Resume a player’s time |
| PLimitTime.command.reload | Reload YAML configuration |
✅ If LuckPerms is not available,
hasPermissionLevel(4)(operator) will be used as a fallback.
⚙️ YAML Configuration
Path: config/playertimelimit.yaml
defaultTime: 18000
reset:
time: "00:00"
timezone: "America/Mexico_City"
warnings:
- time: 1800
message: "⏳ 30 minutes of playtime remaining."
- time: 900
message: "⏳ 15 minutes of playtime remaining."
- time: 120
message: "⏳ 2 minutes left. Get ready!"
messages:
timeExpired: " Your playtime for today has ended. See you tomorrow!"
welcome: " Welcome! You have %time% seconds of playtime remaining."
timeAdded: " %time% seconds have been added to your session!"
timeRemoved: " %time% seconds were removed from your session."
timeReset: " Your time has been reset to %time% seconds."
paused: "✨ Your time is currently paused."
bossbar:
message: "Remaining time: %hours%h %minutes%m %seconds%s"
color: WHITE
🧩 Public API
The mod exposes a public API for integration with other mods. You can access it from:
import com.TNTStudios.playertimelimit.Playertimelimit;
import com.TNTStudios.playertimelimit.api.PlayerTimeLimitAPI;
PlayerTimeLimitAPI api = Playertimelimit.getAPI();
// Usage examples
api.addTime(uuid, 300); // Add 5 minutes
api.removeTime(uuid, 60); // Subtract 1 minute
api.pause(uuid); // Pause time
api.resume(uuid); // Resume time
int time = api.getTime(uuid); // Get remaining time
boolean paused = api.isPaused(uuid); // Check if paused
🧩 Requirements
- Fabric API
- Java 17+
- LuckPerms for advanced permission management.
📄 License
PlayerTimeLimit is an All Rights Reserved licensed project.
Usage is permitted for private, educational, and personal servers.
Public redistribution or modification is not allowed without prior authorization.
🙌 Credits
Developed by TNTStudios.
Designed to promote responsible, controlled, and customizable gameplay in Minecraft communities.
Thanks for using PlayerTimeLimit! 🎮
🇪🇸 Español
⏱ Player Time Limit Mod
PlayerTimeLimit es un mod para servidores (no cliente) de Minecraft en Fabric que permite establecer límites de tiempo de juego por jugador, reiniciarlos diariamente, y gestionar estos tiempos a través de comandos y una API pública. Ideal para servidores educativos, familiares o con control de juego.
📌 Características
- ⏳ Tiempo diario configurable por jugador.
- ⚠️ Advertencias configurables previas al fin del tiempo.
- 📤 Kick automático al terminar el tiempo.
- 🔁 Reinicio diario automático basado en zona horaria.
- 💬 Mensajes personalizados configurables.
- 🧠 Soporte para jugadores offline (UUID cacheado).
- 📊 BossBar informativo en pantalla.
- 🔒 Soporte de permisos con LuckPerms.
- 📦 API pública para otros mods.
🧪 Comandos
Todos los comandos comienzan con /plt y soportan autocompletado de jugadores, incluso si están offline.
/plt check <jugador> # Muestra el tiempo restante
/plt info <jugador> # Muestra estado detallado (tiempo, pausado, agotado)
/plt addtime <jugador> <seg> # Agrega tiempo al jugador
/plt removetime <jugador> <seg> # Remueve tiempo del jugador
/plt resettime <jugador> # Reinicia el tiempo al valor por defecto
/plt pausar <jugador> # Pausa el contador de tiempo del jugador
/plt reanudar <jugador> # Reanuda el contador de tiempo
/plt reload # Recarga el archivo de configuración YAML
🔐 Permisos LuckPerms
Cada comando requiere permisos específicos que puedes asignar con plugins como LuckPerms:
| Permiso | Descripción |
|————————————-|————————————–|
| PLimitTime.admin | Acceso a todos los comandos |
| PLimitTime.command.check | Ver tiempo e info de jugadores |
| PLimitTime.command.addtime | Añadir tiempo a jugadores |
| PLimitTime.command.removetime | Quitar tiempo a jugadores |
| PLimitTime.command.resettime | Reiniciar tiempo de jugadores |
| PLimitTime.command.pausar | Pausar el tiempo de un jugador |
| PLimitTime.command.reanudar | Reanudar el tiempo de un jugador |
| PLimitTime.command.reload | Recargar configuración YAML |
✅ Si LuckPerms no está disponible, se utilizará
hasPermissionLevel(4)(operador) como mecanismo de fallback.
⚙️ Configuración YAML
Ruta: config/playertimelimit.yaml
tiempoPorDefecto: 18000
reinicio:
hora: "00:00"
zonaHoraria: "America/Mexico_City"
advertencias:
- tiempo: 1800
mensaje: "⏳ Quedan 30 minutos de juego."
- tiempo: 900
mensaje: "⏳ Quedan 15 minutos de juego."
- tiempo: 120
mensaje: "⏳ Quedan 2 minutos. ¡Prepárate!"
mensajes:
tiempoAgotado: " Tu tiempo de juego para hoy ha terminado. ¡Nos vemos mañana!"
bienvenida: " ¡Bienvenido! Tienes %tiempo% segundos restantes de juego."
tiempoAgregado: " ¡%tiempo% segundos han sido añadidos a tu sesión!"
tiempoRemovido: " %tiempo% segundos fueron removidos de tu sesión."
tiempoRestablecido: " Tu tiempo ha sido restablecido a %tiempo% segundos."
pausado: "✨ Tu tiempo está actualmente pausado."
bossbar:
message: "Tiempo restante: %horas%h %minutos%m %segundos%s"
color: WHITE
🧩 API Pública
El mod expone una API pública para integraciones con otros mods. Puedes acceder a ella desde:
import com.TNTStudios.playertimelimit.Playertimelimit;
import com.TNTStudios.playertimelimit.api.PlayerTimeLimitAPI;
PlayerTimeLimitAPI api = Playertimelimit.getAPI();
// Ejemplos de uso
api.addTime(uuid, 300); // Añadir 5 minutos
api.removeTime(uuid, 60); // Restar 1 minuto
api.pause(uuid); // Pausar tiempo
api.resume(uuid); // Reanudar tiempo
int tiempo = api.getTime(uuid); // Consultar tiempo restante
boolean pausado = api.isPaused(uuid); // Verificar si está pausado
🧩 Requisitos
- Fabric API
- Java 17+
- LuckPerms para gestión avanzada de permisos.
📄 Licencia
PlayerTimeLimit es un proyecto con licencia All Rights Reserved.
Su uso está permitido para servidores privados, educativos y personales.
No se permite redistribuir ni modificar públicamente sin autorización previa.
🙌 Créditos
Desarrollado por TNTStudios.
Diseñado con el propósito de fomentar un juego responsable, controlado y personalizable en comunidades de Minecraft.
¡Gracias por usar PlayerTimeLimit! 🎮
常见问题
PlayerTimeLimit 支持哪些 Minecraft 版本?
PlayerTimeLimit 支持 Minecraft Java 版 1.20.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
PlayerTimeLimit 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。
tntnetta 的其他作品
查看全部 →
FakeName Fabric
Fabric mod, to customize displayed names via commands, inspired by Forge's FakeName but reimagined for Fabric.
PlayerReviveFabric
lets players revive fallen teammates before they die completely. Perfect for survival servers, adventures, and SMPs where teamwork matters more than losing everything to an unexpected death.
ItemMarket
Mod that adds a GUI for buying and selling items. | Mod que agrega una GUI para compra y venta de artículos.
ItemApult
Throw any held item, pass it to friends, and catch it mid-air
评论
登录后评论和评分