libreforge-updater
This commit is contained in:
@@ -30,14 +30,6 @@ class TalismansPlugin : LibReforgePlugin() {
|
||||
|
||||
override fun handleReloadAdditional() {
|
||||
logger.info("${Talismans.values().size} Talismans Loaded")
|
||||
/*
|
||||
Broken with talisman bag rn
|
||||
CustomItem(
|
||||
this.namespacedKeyFactory.create("any_talisman"),
|
||||
{ test -> TalismanChecks.getTalismanOnItem(test) != null },
|
||||
Talismans.values()[0].itemStack
|
||||
).register()
|
||||
*/
|
||||
}
|
||||
|
||||
override fun loadPluginCommands(): List<PluginCommand> {
|
||||
@@ -58,10 +50,6 @@ class TalismansPlugin : LibReforgePlugin() {
|
||||
return TalismanDisplay(this)
|
||||
}
|
||||
|
||||
override fun getMinimumEcoVersion(): String {
|
||||
return "6.36.3"
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
lateinit var instance: TalismansPlugin
|
||||
|
||||
@@ -57,10 +57,12 @@ object TalismanBag {
|
||||
plugin.namespacedKeyFactory.create("talisman_bag"),
|
||||
PersistentDataKeyType.STRING_LIST,
|
||||
emptyList()
|
||||
).player()
|
||||
)
|
||||
|
||||
for (rows in 1..6) {
|
||||
menus[rows] = menu(rows) {
|
||||
title = plugin.configYml.getFormattedString("bag.title")
|
||||
|
||||
for (row in 1..rows) {
|
||||
for (column in 1..9) {
|
||||
setSlot(row, column, slot({ player, _ ->
|
||||
@@ -83,8 +85,6 @@ object TalismanBag {
|
||||
}
|
||||
}
|
||||
|
||||
setTitle(plugin.configYml.getFormattedString("bag.title"))
|
||||
|
||||
onRender { player, menu ->
|
||||
val items = menu.getCaptiveItems(player)
|
||||
.filterNot { EmptyTestableItem().matches(it) }
|
||||
|
||||
@@ -36,10 +36,10 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com
|
||||
amount = args[2].toIntOrNull() ?: 1
|
||||
}
|
||||
|
||||
val recieverName = args[0]
|
||||
val reciever = Bukkit.getPlayer(recieverName)
|
||||
val receiverName = args[0]
|
||||
val receiver = Bukkit.getPlayer(receiverName)
|
||||
|
||||
if (reciever == null) {
|
||||
if (receiver == null) {
|
||||
sender.sendMessage(plugin.langYml.getMessage("invalid-player"))
|
||||
return
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com
|
||||
|
||||
var message = plugin.langYml.getMessage("give-success")
|
||||
|
||||
message = message.replace("%talisman%", talisman.name).replace("%recipient%", reciever.name)
|
||||
message = message.replace("%talisman%", talisman.name).replace("%recipient%", receiver.name)
|
||||
|
||||
sender.sendMessage(message)
|
||||
|
||||
@@ -62,7 +62,7 @@ class CommandGive(plugin: EcoPlugin) : Subcommand(plugin, "give", "talismans.com
|
||||
|
||||
itemStack.amount = amount
|
||||
|
||||
reciever.inventory.addItem(itemStack)
|
||||
receiver.inventory.addItem(itemStack)
|
||||
}
|
||||
|
||||
override fun tabComplete(sender: CommandSender, args: List<String>): List<String> {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.willfp.talismans.command
|
||||
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.command.impl.PluginCommand
|
||||
import com.willfp.libreforge.LibReforgePlugin
|
||||
import com.willfp.libreforge.lrcdb.CommandExport
|
||||
|
||||
@@ -70,13 +70,15 @@ class Talisman(
|
||||
val lowerLevel: Talisman?
|
||||
get() = Talismans.getByID(config.getString("higherLevelOf"))
|
||||
|
||||
override val effects = config.getSubsections("effects").mapNotNull {
|
||||
Effects.compile(it, "Talisman ID $id")
|
||||
}.toSet()
|
||||
override val effects = Effects.compile(
|
||||
config.getSubsections("effects"),
|
||||
"Talisman $id"
|
||||
)
|
||||
|
||||
override val conditions = config.getSubsections("conditions").mapNotNull {
|
||||
Conditions.compile(it, "Talisman ID $id")
|
||||
}.toSet()
|
||||
override val conditions = Conditions.compile(
|
||||
config.getSubsections("conditions"),
|
||||
"Talisman $id"
|
||||
)
|
||||
|
||||
init {
|
||||
Talismans.addNewTalisman(this)
|
||||
|
||||
@@ -39,7 +39,14 @@ cannot-afford-type:
|
||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||
pitch: 0.5
|
||||
|
||||
point-names: # If you have point names that look ugly (eg g_souls) then you can map them to nice names to be shown to players.
|
||||
cannot-afford-price:
|
||||
in-actionbar: true
|
||||
sound:
|
||||
enabled: true
|
||||
sound: "BLOCK_NOTE_BLOCK_PLING"
|
||||
pitch: 0.5
|
||||
|
||||
point-names: # If you have point names that look ugly (eg souls) then you can map them to nice names to be shown to players.
|
||||
example_point: "Nicely Formatted Point"
|
||||
|
||||
use-faster-move-trigger: true # Disable if you want move trigger to detect sub-1-block movements
|
||||
|
||||
@@ -2,16 +2,11 @@ messages:
|
||||
prefix: "&6&lTalismans&r &8» &r"
|
||||
no-permission: "&cYou don't have permission to do this!"
|
||||
not-player: "&cThis command must be run by a player"
|
||||
invalid-command: "&cUnknown Subcommand!"
|
||||
reloaded: "Reloaded! Took %time%ms"
|
||||
needs-player: "&cYou must specify a player"
|
||||
invalid-player: "&cInvalid player!"
|
||||
needs-talisman: "&cYou must specify a talisman"
|
||||
invalid-talisman: "&cInvalid talisman!"
|
||||
invalid-level: "&cLevel doesn't exist!"
|
||||
give-success: "Gave &a%talisman%&r to &a%recipient%"
|
||||
invalid-command: "&cUnknown subcommand!"
|
||||
reloaded: "Reloaded!"
|
||||
cannot-afford: "&cYou can't afford to do this! &fCost: &a$$%cost%"
|
||||
cannot-afford-type: "&cYou can't afford to do this! &fCost: &a%cost% %type%"
|
||||
cannot-afford-price: "&cYou can't afford to do this! &fPrice: %price%"
|
||||
on-cooldown: "&cThis effect is on cooldown! &fTime left: &a%seconds% seconds"
|
||||
cannot-transmit: "&cYou can't transmit here!"
|
||||
must-specify-lrcdb-id: "&cYou must specify the ID of the config to download! Not sure what this means? Go to &alrcdb.auxilor.io"
|
||||
@@ -20,4 +15,11 @@ messages:
|
||||
must-specify-config-name: "&cYou must specify the config name!"
|
||||
invalid-config-name: "&cInvalid config name!"
|
||||
lrcdb-export-error: "&cError exporting config: &f%message%"
|
||||
lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%"
|
||||
lrcdb-export-success: "&fExported &a%name%&f! View it on &alrcdb.auxilor.io&f, or share your config ID: &f%id%"
|
||||
|
||||
needs-player: "&cYou must specify a player"
|
||||
invalid-player: "&cInvalid player!"
|
||||
needs-talisman: "&cYou must specify a talisman"
|
||||
invalid-talisman: "&cInvalid talisman!"
|
||||
invalid-level: "&cLevel doesn't exist!"
|
||||
give-success: "Gave &a%talisman%&r to &a%recipient%"
|
||||
|
||||
Reference in New Issue
Block a user