mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
per color code permission
This commit is contained in:
parent
809dc3488b
commit
d926b5001e
7 changed files with 119 additions and 20 deletions
|
|
@ -2,7 +2,6 @@ package io.delilaheve.util
|
|||
|
||||
import io.delilaheve.CustomAnvil
|
||||
import io.delilaheve.util.EnchantmentUtil.enchantmentName
|
||||
import org.bukkit.Material
|
||||
import org.bukkit.NamespacedKey
|
||||
import xyz.alexcrea.cuanvil.config.ConfigHolder
|
||||
import xyz.alexcrea.cuanvil.config.WorkPenaltyType
|
||||
|
|
@ -45,6 +44,8 @@ object ConfigOptions {
|
|||
const val PERMISSION_NEEDED_FOR_COLOR = "permission_needed_for_color"
|
||||
const val USE_OF_COLOR_COST = "use_of_color_cost"
|
||||
|
||||
const val PER_COLOR_CODE_PERMISSION = "per_color_code_permission"
|
||||
|
||||
// Work penalty config
|
||||
const val WORK_PENALTY_ROOT = "work_penalty"
|
||||
const val WORK_PENALTY_INCREASE = "shared_increase"
|
||||
|
|
@ -100,6 +101,8 @@ object ConfigOptions {
|
|||
const val DEFAULT_PERMISSION_NEEDED_FOR_COLOR = true
|
||||
const val DEFAULT_USE_OF_COLOR_COST = 0
|
||||
|
||||
const val DEFAULT_PER_COLOR_CODE_PERMISSION = false
|
||||
|
||||
// Debug flag
|
||||
private const val DEFAULT_DEBUG_LOG = false
|
||||
private const val DEFAULT_VERBOSE_DEBUG_LOG = false
|
||||
|
|
@ -297,6 +300,16 @@ object ConfigOptions {
|
|||
.getBoolean(PERMISSION_NEEDED_FOR_COLOR, DEFAULT_PERMISSION_NEEDED_FOR_COLOR)
|
||||
}
|
||||
|
||||
/**
|
||||
* Should each color code require a permission
|
||||
*/
|
||||
val usePerColorCodePermission: Boolean
|
||||
get() {
|
||||
return ConfigHolder.DEFAULT_CONFIG
|
||||
.config
|
||||
.getBoolean(PER_COLOR_CODE_PERMISSION, DEFAULT_PER_COLOR_CODE_PERMISSION)
|
||||
}
|
||||
|
||||
/**
|
||||
* How many xp should use of color should cost
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue