
Player Activity
The Player Activity mod provides the ability to automatically execute commands based on players' gameplay time. You can configure triggers that activate when a player reaches a certain offline time or total playtime in the world.
Main Features
The effects system works through JSON configuration, where each effect is executed independently for each player. Here's a configuration example:
{
"effects": [
{
"ID": "TestID", // Unique effect identifier
"Command": "stop", // Command to execute (can use string array for multiple commands)
"TimeUnit": "s", // Time unit: nanoseconds, microseconds, milliseconds, seconds (s), minutes (m), hours (h), days
"Time": 20, // Time interval before command execution
"Saved": true, // Whether to save effect execution (resets when player logs in/out)
"Online": true, // Whether player must be online
"Repeat": false // Whether to repeat command each time timer triggers
}
]
}
Key Effect Parameters
- ID - unique identifier for tracking command execution
- Command - command or array of commands to execute
- Time & TimeUnit - define time interval before activation (internal timer runs with 1200 tick delay for optimization)
- Saved - determines if effect applies once per session or only once
- Online - whether player presence online is required
- Repeat - special repetition mode with specific operating conditions
Tag System
Additional feature - grouping effects into tags for convenient bulk management:
{
"tags": [
{
"Tag": "TestTag", // Unique tag identifier
"ID": ["TestID"], // List of effects to manage (string or string array)
"Default": true // Automatically apply tag on player's first login
}
]
}
Available Commands
/playerActivity help
- displays all commands with explanations/playerActivity reload
- reloads JSON file without game restart/playerActivity addData PlayerName EffectID
- adds effect to player as completed/playerActivity removeData PlayerName EffectID
- removes effect from player/playerActivity addTag PlayerName TagID
- bulk adds all tag effects/playerActivity removeTag PlayerName TagID
- bulk removes all tag effects/playerActivity PlayTime PlayerName
- shows player's total playtime/playerActivity offlineTime PlayerName
- shows player's offline time since last logout
Features
The mod automatically creates necessary JSON configuration files. Command auto-completion is supported for user convenience.