mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
add rename dialog options
This commit is contained in:
parent
90cc758e88
commit
65bf82a239
7 changed files with 96 additions and 0 deletions
|
|
@ -99,6 +99,16 @@ permission_needed_for_color: true
|
||||||
# Valid values include 0 to 1000.
|
# Valid values include 0 to 1000.
|
||||||
use_of_color_cost: 0
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can change the maximum size
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
# Enchantments not listed here will use the value of default_limit
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,16 @@ permission_needed_for_color: true
|
||||||
# Valid values include 0 to 1000.
|
# Valid values include 0 to 1000.
|
||||||
use_of_color_cost: 0
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can change the maximum size
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
# Enchantments not listed here will use the value of default_limit
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,16 @@ permission_needed_for_color: true
|
||||||
# Valid values include 0 to 1000.
|
# Valid values include 0 to 1000.
|
||||||
use_of_color_cost: 0
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can change the maximum size
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
# Enchantments not listed here will use the value of default_limit
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,16 @@ permission_needed_for_color: true
|
||||||
# Valid values include 0 to 1000.
|
# Valid values include 0 to 1000.
|
||||||
use_of_color_cost: 0
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can change the maximum size
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
# Enchantments not listed here will use the value of default_limit
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,12 @@ object ConfigOptions {
|
||||||
const val ENCHANT_LIMIT_ROOT = "enchant_limits"
|
const val ENCHANT_LIMIT_ROOT = "enchant_limits"
|
||||||
const val ENCHANT_VALUES_ROOT = "enchant_values"
|
const val ENCHANT_VALUES_ROOT = "enchant_values"
|
||||||
|
|
||||||
|
// Dialog menu rename
|
||||||
|
const val DIALOG_RENAME_ENABLED = "enable_dialog_rename"
|
||||||
|
const val DIALOG_MAX_SIZE = "dialog_rename_max_size"
|
||||||
|
const val DIALOG_RENAME_USE_PERMISSION = "permission_needed_for_dialog_rename"
|
||||||
|
|
||||||
|
// Others
|
||||||
const val DISABLE_MERGE_OVER_ROOT = "disable-merge-over"
|
const val DISABLE_MERGE_OVER_ROOT = "disable-merge-over"
|
||||||
|
|
||||||
const val IMMUTABLE_ENCHANTMENT_LIST = "immutable_enchantments"
|
const val IMMUTABLE_ENCHANTMENT_LIST = "immutable_enchantments"
|
||||||
|
|
@ -107,6 +113,11 @@ object ConfigOptions {
|
||||||
private const val DEFAULT_DEBUG_LOG = false
|
private const val DEFAULT_DEBUG_LOG = false
|
||||||
private const val DEFAULT_VERBOSE_DEBUG_LOG = false
|
private const val DEFAULT_VERBOSE_DEBUG_LOG = false
|
||||||
|
|
||||||
|
// Dialog menu rename
|
||||||
|
const val DEFAULT_DIALOG_RENAME_ENABLED = false
|
||||||
|
const val DEFAULT_DIALOG_MAX_SIZE = 256
|
||||||
|
const val DEFAULT_DIALOG_RENAME_USE_PERMISSION = false
|
||||||
|
|
||||||
// -------------
|
// -------------
|
||||||
// Config Ranges
|
// Config Ranges
|
||||||
// -------------
|
// -------------
|
||||||
|
|
@ -416,6 +427,36 @@ object ConfigOptions {
|
||||||
.getBoolean(VERBOSE_DEBUG_LOGGING, DEFAULT_VERBOSE_DEBUG_LOG)
|
.getBoolean(VERBOSE_DEBUG_LOGGING, DEFAULT_VERBOSE_DEBUG_LOG)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is the dialog menu for rename enabled
|
||||||
|
*/
|
||||||
|
val doRenameDialog: Boolean
|
||||||
|
get() {
|
||||||
|
return ConfigHolder.DEFAULT_CONFIG
|
||||||
|
.config
|
||||||
|
.getBoolean(DIALOG_RENAME_ENABLED, DEFAULT_DIALOG_RENAME_ENABLED)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do the dialog menu require permission
|
||||||
|
*/
|
||||||
|
val doRenameDialogUsePermission: Boolean
|
||||||
|
get() {
|
||||||
|
return ConfigHolder.DEFAULT_CONFIG
|
||||||
|
.config
|
||||||
|
.getBoolean(DIALOG_RENAME_USE_PERMISSION, DEFAULT_DIALOG_RENAME_USE_PERMISSION)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Do the dialog menu require permission
|
||||||
|
*/
|
||||||
|
val renameDialogMaxSize: Int
|
||||||
|
get() {
|
||||||
|
return ConfigHolder.DEFAULT_CONFIG
|
||||||
|
.config
|
||||||
|
.getInt(DIALOG_MAX_SIZE, DEFAULT_DIALOG_MAX_SIZE)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the given [enchantment]'s limit
|
* Get the given [enchantment]'s limit
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,16 @@ permission_needed_for_color: true
|
||||||
# Valid values include 0 to 1000.
|
# Valid values include 0 to 1000.
|
||||||
use_of_color_cost: 0
|
use_of_color_cost: 0
|
||||||
|
|
||||||
|
# Dialogue rename menu make use of dialog menu to allow bigger rename
|
||||||
|
# You can change the maximum size
|
||||||
|
#
|
||||||
|
# At the moment only english is available for this menu... sorry !
|
||||||
|
#
|
||||||
|
# CustomAnvil use "ca.rename.dialog" when permission
|
||||||
|
enable_dialog_rename: false
|
||||||
|
dialog_rename_max_size: 256
|
||||||
|
permission_needed_for_dialog_rename: false
|
||||||
|
|
||||||
# Override limits for specific enchants
|
# Override limits for specific enchants
|
||||||
#
|
#
|
||||||
# Enchantments not listed here will use the value of default_limit
|
# Enchantments not listed here will use the value of default_limit
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,11 @@ permissions:
|
||||||
ca.lore_edit.paper:
|
ca.lore_edit.paper:
|
||||||
default: op
|
default: op
|
||||||
description: Allow player to edit lore via paper if enabled (toggleable)
|
description: Allow player to edit lore via paper if enabled (toggleable)
|
||||||
|
# dialog menu permission
|
||||||
|
ca.rename.dialog:
|
||||||
|
default: op
|
||||||
|
description: Allow player to use the dialog rename menu (toggleable)
|
||||||
|
|
||||||
|
|
||||||
# soft depend on old name of this plugin (UnsafeEnchantsPlus), so I can disable it if it is on the same server
|
# soft depend on old name of this plugin (UnsafeEnchantsPlus), so I can disable it if it is on the same server
|
||||||
# Also depend to other plugin for compatibility
|
# Also depend to other plugin for compatibility
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue