9
0
mirror of https://github.com/Auxilor/EcoQuests.git synced 2025-12-22 16:39:21 +00:00

Compare commits

...

7 Commits
1.4.0 ... 1.6.0

Author SHA1 Message Date
Auxilor
335524a2da libreforge-updater 2023-09-17 11:20:21 +01:00
Auxilor
73d748d445 libreforge-updater 2023-09-13 15:08:56 +01:00
Auxilor
e0e0804cce libreforge-updater 2023-09-07 16:01:57 +01:00
Auxilor
c00d5eb7d2 libreforge-updater 2023-09-02 17:34:44 +01:00
Will FP
f7fab37555 Fixed page changers 2023-09-01 12:32:17 +01:00
Auxilor
a93aac6b6f libreforge-updater 2023-08-31 16:59:46 +01:00
Auxilor
025a74048a Added on-complete 2023-08-31 16:57:13 +01:00
6 changed files with 18 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ class PositionedPageChanger(
direction: PageChanger.Direction
): PositionedComponent {
private val pageChanger = PageChanger(
Items.lookup("item").item,
Items.lookup(config.getString("item")).item,
direction
)

View File

@@ -152,6 +152,7 @@ class Task(
if (newXp >= requiredXp) {
player.profile.write(hasCompletedKey, true)
template.onComplete?.trigger(player)
Bukkit.getPluginManager().callEvent(PlayerTaskCompleteEvent(player, template, quest))

View File

@@ -6,6 +6,7 @@ import com.willfp.eco.core.registry.KRegistrable
import com.willfp.ecoquests.quests.Quest
import com.willfp.libreforge.ViolationContext
import com.willfp.libreforge.counters.Counters
import com.willfp.libreforge.effects.Effects
class TaskTemplate(
private val plugin: EcoPlugin,
@@ -16,6 +17,11 @@ class TaskTemplate(
Counters.compile(it, ViolationContext(plugin, "task $id tasks"))
}
val onComplete = Effects.compileChain(
config.getSubsections("on-complete"),
ViolationContext(plugin, "task $id on-complete")
)
fun create(quest: Quest, xpExpr: String) =
Task(plugin, this, quest, xpExpr)
}

View File

@@ -21,3 +21,10 @@ xp-gain-methods:
filters:
blocks:
- stone
# An optional list of effects to run when a player completes the task
# Read here: https://plugins.auxilor.io/effects/configuring-an-effect
on-complete:
- id: send_message
args:
message: "Task Completed!"

View File

@@ -1,5 +1,5 @@
#libreforge-updater
#Wed Aug 30 11:31:41 BST 2023
#Sun Sep 17 11:20:21 BST 2023
kotlin.code.style=official
libreforge-version=4.32.0
version=1.4.0
libreforge-version=4.34.0
version=1.6.0

0
gradlew vendored Normal file → Executable file
View File