Import Tasks
# Task Import Configuration Guide
In AI era, using GUI for task creation is becoming increasingly inefficient, so task import functionality was added in
version 2.10.0.
You can feed this document to AI to generate tasks according to format.
This document explains in detail how to batch import tasks into PlayerTask plugin using import.yml configuration file.
# Usage Command
/plk import
After execution, it reads plugins/PlayerTask/import.yml file and imports tasks. Newly added tasks will automatically
fill in the id in configuration file.
# Configuration File Structure
tasks:
task_identifier1:
# id: 1 # Optional, updates existing task when id present, adds new task when absent (auto-filled after import)
taskName: "&fTask Name" # Required, supports color codes
type: everyday # Optional, task type, default everyday
rarity: normal # Optional, task rarity, default normal
description: "Task description" # Optional, task description text
enableCommand: "say hello" # Optional, command to execute when accepting NPC task
demands: # Required, task objectives list
- type: blockBreak
amount: 10
itemStack: OAK_LOG
rewards: # Required, task rewards list
- type: vault
amount: 100
# Task Types (type)
| Type Value | Description | Notes |
|---|---|---|
everyday | Daily tasks | Default value, randomly refreshed to players daily |
npc | NPC tasks | Requires NPC plugin |
reel | Scroll tasks | Triggered through task scroll items |
# Task Rarity (rarity)
| Rarity Value | Description | Color Code |
|---|---|---|
normal | Normal tasks | &f White |
advanced | Advanced tasks | &9 Blue |
rare | Rare tasks | &5 Purple |
rarer | Epic tasks | &d Pink |
epic | Legendary tasks | &e Gold |
mythical | Mythic tasks | &e&l Gold Bold |
# Task Objective Types (demands)
# Basic Format
demands:
- type: objective type
amount: quantity
itemStack: item/monster/material identifier
# Detailed Explanation of All Objective Types
# 1. craftItem - Craft Item
Players need to craft specified items.
- type: craftItem
amount: 5
itemStack: DIAMOND_SWORD # Minecraft item ID
# 2. blockBreak - Break Block
Players need to break specified blocks.
- type: blockBreak
amount: 64
itemStack: STONE # Minecraft block ID
# 3. Fish - Fishing
Players need to catch specified items.
- type: Fish
amount: 10
itemStack: COD # Item caught by fishing
# 4. Interact - Place Block
Players need to place specified blocks.
- type: Interact
amount: 20
itemStack: TORCH # Block to place
# 5. kill - Kill MythicMobs Mobs
Requires MythicMobs plugin.
- type: kill
amount: 5
itemStack: SkeletonKing # MythicMobs mob ID
# 6. killNormal - Kill Normal Mobs
Kill vanilla Minecraft mobs.
- type: killNormal
amount: 10
itemStack: zombie # Mob type, lowercase
# 7. killPlayer - Kill Players
PVP tasks, kill other players.
- type: killPlayer
amount: 3
itemStack: Player name
# 8. killMp - Kill MonsterPlus Mobs
Requires MonsterPlus plugin.
- type: killMp
amount: 5
itemStack: boss_dragon # MonsterPlus mob ID
# 9. consume - Consume/Eat Items
Players need to eat specified items.
- type: consume
amount: 10
itemStack: COOKED_BEEF # Food item ID
# 10. submit - Submit Items
Players need to submit specified items (items will be consumed).
- type: submit
amount: 32
itemStack: IRON_INGOT # Item to submit
# 11. enchantment - Enchant Item
Players need to enchant items to specified level.
- type: enchantment
amount: 3 # Enchantment level
itemStack: SHARPNESS:1 # Enchantment type:level, level is optional, defaults to max level
# 12. shear - Shear
Players need to shear sheep or other shearable entities.
- type: shear
amount: 10
itemStack: wool # Optional wool:wool mushroom_stew:mushroom_stew
# 13. breed - Breed Animals
Players need to breed specified animals.
- type: breed
amount: 5
itemStack: cow # Animal type, lowercase
# 14. tame - Tame Animals
Players need to tame specified animals.
- type: tame
amount: 2
itemStack: wolf # Animal type, lowercase
# 15. chat - Send Chat Message
Requires PlayerChat plugin. Players need to send messages containing specified content.
- type: chat
amount: 1
itemStack: 'hello' # Message keyword
# 16. interaction - Interact
Players need to interact with specified blocks (right-click).
- type: interaction
amount: 10
itemStack: CHEST # Block type
# 17. command - Execute Command
Players need to execute specified command.
- type: command
amount: 1
itemStack: spawn # Command content without /
# Task Reward Types (rewards)
# Basic Format
rewards:
- type: reward type
amount: quantity
itemStack: additional parameters # Required for some types
description: "Reward description" # Optional, displayed in GUI
# Detailed Explanation of All Reward Types
# 1. vault - Coin Reward
Requires Vault and economy plugin.
- type: vault
amount: 500 # Coin amount
description: "500 coins" # Optional
# 2. playerPoints - Points Reward
Requires PlayerPoints plugin.
- type: playerPoints
amount: 100 # Points amount
description: "100 points"
# 3. coin - Task Coin Reward
PlayerTask built-in currency.
- type: coin
amount: 50 # Task coin amount
description: "50 task coins"
# 4. itemStack - Item Reward
Give players specified items.
- type: itemStack
amount: 1 # Item quantity
itemStack: DIAMOND # Item ID
description: "Diamond x1"
# 5. command - Command Reward
Execute console commands, supports variables.
- type: command
amount: 1 # Execution times
itemStack: 'give %player% diamond 5' # Command
description: "Get 5 diamonds"
Command format description:
%player%will be replaced with player name
# 6. player_currency_xxx - PlayerCurrency Multi-Currency
Requires PlayerCurrency plugin.
- type: ply_point # ply + currency ID
amount: 100
description: "100 points" # Optional description
# Complete Configuration Example
tasks:
# Beginner Task - Lumberjack
lumberjack:
taskName: "&fLumberjack"
type: everyday
rarity: normal
description: "Cut down various trees to get wood"
demands:
- type: blockBreak
amount: 20
itemStack: OAK_LOG
- type: blockBreak
amount: 10
itemStack: BIRCH_LOG
rewards:
- type: vault
amount: 100
- type: coin
amount: 10
# Intermediate Task - Monster Hunter
monster_hunter:
taskName: "&9Monster Hunter"
type: everyday
rarity: advanced
description: "Clear dangerous monsters"
demands:
- type: killNormal
amount: 15
itemStack: zombie
- type: killNormal
amount: 10
itemStack: skeleton
rewards:
- type: vault
amount: 300
- type: itemStack
amount: 5
itemStack: IRON_INGOT
description: "Iron Ingot x5"
# Advanced Task - Master Miner
master_miner:
taskName: "&5Master Miner"
type: everyday
rarity: rare
description: "Dig deep underground for precious ores"
demands:
- type: blockBreak
amount: 10
itemStack: DIAMOND_ORE
- type: blockBreak
amount: 20
itemStack: GOLD_ORE
rewards:
- type: vault
amount: 1000
- type: command
amount: 1
itemStack: 'give %player% diamond 3'
description: "Diamond x3"
# Epic Task - Beast Tamer
beast_tamer:
taskName: "&eBeast Tamer"
type: everyday
rarity: epic
description: "Tame wild animals as your companions"
demands:
- type: tame
amount: 3
itemStack: wolf
- type: breed
amount: 5
itemStack: cow
rewards:
- type: vault
amount: 2000
- type: coin
amount: 100
- type: playerPoints
amount: 50
description: "50 points"
# NPC Task Example
npc_fishing_quest:
taskName: "&dFisher's Request"
type: npc
rarity: rarer
description: "Help the fisherman collect fish"
enableCommand: "say %player% accepted the fisherman's request"
demands:
- type: Fish
amount: 20
itemStack: COD
- type: Fish
amount: 10
itemStack: SALMON
rewards:
- type: vault
amount: 500
- type: itemStack
amount: 1
itemStack: FISHING_ROD
description: "Fishing Rod x1"
# Notes
Task Identifier (such as
lumberjack,monster_hunter) is just the key in configuration file, not shown to players.id Field:
- First import doesn't require filling in
id, system will auto-generate and fill it back - On subsequent imports, tasks with
idwill be updated, tasks withoutidwill be added as new
- First import doesn't require filling in
itemStack Case:
- Block/Item IDs: recommend uppercase (such as
DIAMOND_ORE) - Mob/Animal types: must be lowercase (such as
zombie,wolf) - MythicMobs IDs: keep as is
- Block/Item IDs: recommend uppercase (such as
Color Codes:
- Use
&symbol, such as&agreen,&cred,&eyellow &lbold,&oitalic,&nunderline
- Use
Command Rewards:
- Supports PlaceholderAPI variables
Deduplication Mechanism:
- Automatically checks existing task objectives and rewards during import
- Same objectives/rewards will be reused, not duplicated