mirror of
https://github.com/Auxilor/EcoQuests.git
synced 2025-12-22 16:39:21 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf085b4ea5 | ||
|
|
1a1433f84f | ||
|
|
571b4c05e2 | ||
|
|
58aa2fd81d | ||
|
|
335524a2da | ||
|
|
73d748d445 | ||
|
|
e0e0804cce | ||
|
|
c00d5eb7d2 | ||
|
|
f7fab37555 | ||
|
|
a93aac6b6f | ||
|
|
025a74048a |
@@ -3,8 +3,6 @@ package com.willfp.ecoquests.commands
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.command.impl.PluginCommand
|
||||
import com.willfp.ecoquests.gui.QuestsGUI
|
||||
import com.willfp.libreforge.commands.CommandReload
|
||||
import org.bukkit.command.CommandSender
|
||||
import org.bukkit.entity.Player
|
||||
|
||||
class CommandQuests(plugin: EcoPlugin) : PluginCommand(
|
||||
|
||||
@@ -3,11 +3,8 @@ package com.willfp.ecoquests.commands
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.command.impl.PluginCommand
|
||||
import com.willfp.eco.util.StringUtils
|
||||
import com.willfp.ecoquests.gui.QuestsGUI
|
||||
import com.willfp.ecoquests.quests.Quests
|
||||
import com.willfp.libreforge.commands.CommandReload
|
||||
import org.bukkit.command.CommandSender
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.util.StringUtil
|
||||
|
||||
class CommandStart(plugin: EcoPlugin) : PluginCommand(
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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!"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#libreforge-updater
|
||||
#Wed Aug 30 11:31:41 BST 2023
|
||||
#Tue Sep 26 14:46:03 BST 2023
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.32.0
|
||||
version=1.4.0
|
||||
libreforge-version=4.35.0
|
||||
version=1.7.0
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Reference in New Issue
Block a user