mirror of
https://github.com/CarmJos/UserPrefix.git
synced 2026-06-05 00:35:02 +08:00
chore(item): 更换物品的配置逻辑,支持跨版本的物品读取、保存。
BREAKING-CHANGE: 旧的配置文件需要进行变更。
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# identifier [Necessary]
|
||||
# This will be used for data-storage.
|
||||
identifier: "pro"
|
||||
|
||||
# Name [Necessary]
|
||||
# Use in messages.
|
||||
name: "&b&lPro&b"
|
||||
|
||||
# Content [Necessary]
|
||||
# Use in Placeholders
|
||||
content: "&b&lPro &b"
|
||||
|
||||
# Weight [Necessary]
|
||||
# used for sorting in the GUI and TabList
|
||||
# In GUI : the larger is displayed at the back
|
||||
# At TabList : the larger is displayed at the top
|
||||
weight: 1
|
||||
|
||||
# Permission [Unnecessary]
|
||||
# If there is no permission for detection, everyone can use it,
|
||||
# which means there is no need to configure "itemNoPermission"
|
||||
# (because it is impossible to display items without permission at all)
|
||||
permission: "yc.vip"
|
||||
|
||||
# Actions when select [Unnecessary]
|
||||
# Please check https://github.com/CarmJos/UserPrefix/tree/master/.documentation/ACTIONS.md
|
||||
actions:
|
||||
- "[CONSOLE] say %player_name% selected PRO !"
|
||||
|
||||
# Display item configuration
|
||||
# More details please see https://github.com/CryptoMorin/XSeries/wiki/XItemStack
|
||||
item:
|
||||
# itemHasPermission [Necessary]
|
||||
# This Item will be displayed when player has permission
|
||||
has-perm:
|
||||
material: DIAMOND
|
||||
name: "&b&lVIP Prefix"
|
||||
lore:
|
||||
- ""
|
||||
- "&a➥ Click to use"
|
||||
|
||||
# itemUsing [Unnecessary]
|
||||
# This Item will be displayed when the prefix is selected.
|
||||
# If there is no such configuration, it will automatically display "itemHasPermission".
|
||||
using:
|
||||
material: DIAMOND
|
||||
name: "&b&lVIP Prefix"
|
||||
enchants:
|
||||
PROTECTION_ENVIRONMENTAL: 1 #Add an enchantment so it looks like it’s selected
|
||||
lore:
|
||||
- ""
|
||||
- "&a✔ Selected"
|
||||
|
||||
# itemNoPermission [Unnecessary]
|
||||
# If player doesn't have the permission,this item will be displayed.
|
||||
# If this item is not configured, it will not be displayed in the GUI when the player does not have permission to use it.
|
||||
no-perm:
|
||||
material: INK_SACK
|
||||
data: 8
|
||||
name: "&b&lVIP &c(Buy it!)"
|
||||
lore:
|
||||
- ""
|
||||
- "&e✯ Buy the VIP to use it!"
|
||||
@@ -0,0 +1,58 @@
|
||||
|
||||
# Nombre [Necesario]
|
||||
# Uso en mensajes.
|
||||
name: "&b&lPro&b"
|
||||
|
||||
# Contenido [Necesario]
|
||||
# Uso en Placeholders
|
||||
content: "&b&lPro &b"
|
||||
|
||||
# Weight [Necesario]
|
||||
# utilizado para ordenar en la GUI y TabList
|
||||
# En GUI : el más grande se muestra en la parte posterior
|
||||
# En TabList : el más grande se muestra en la parte superior
|
||||
weight: 1
|
||||
|
||||
# Permisos [Innecesario]
|
||||
# Si no hay permiso para la detección, todo el mundo puede utilizarlo,
|
||||
# lo que significa que no es necesario configurar "itemNoPermission"
|
||||
# (porque es imposible mostrar elementos sin permiso en absoluto)
|
||||
permission: "yc.vip"
|
||||
|
||||
# Acciones al seleccionar [Innecesario]
|
||||
# Por favor, compruebe https://github.com/CarmJos/UserPrefix/tree/master/.documentation/ACTIONS.md
|
||||
actions:
|
||||
- "[CONSOLE] say %player_name% PRO seleccionado !"
|
||||
|
||||
item:
|
||||
# itemHasPermission [Necesario]
|
||||
# Este elemento se mostrará cuando el jugador tenga permiso
|
||||
has-perm:
|
||||
material: DIAMOND
|
||||
name: "&b&lVIP Prefix"
|
||||
lore:
|
||||
- ""
|
||||
- "&a➥ Pulse para utilizar"
|
||||
|
||||
# itemUsing [Innecesario]
|
||||
# Este elemento se mostrará cuando se seleccione el prefijo.
|
||||
# Si no existe tal configuración, se mostrará automáticamente "itemHasPermission".
|
||||
using:
|
||||
material: DIAMOND
|
||||
name: "&b&lVIP Prefix"
|
||||
enchants:
|
||||
PROTECTION_ENVIRONMENTAL: 1 #Añade un encantamiento para que parezca que está seleccionado
|
||||
lore:
|
||||
- ""
|
||||
- "&a✔ Seleccionado"
|
||||
|
||||
# itemNoPermission [Innecesario]
|
||||
# Si el jugador no tiene el permiso,este item sera mostrado.
|
||||
# Si este elemento no está configurado, no se mostrará en la GUI cuando el jugador no tenga permiso para usarlo.
|
||||
no-perm:
|
||||
material: INK_SACK
|
||||
data: 8
|
||||
name: "&b&lVIP &c(¡Cómpralo!)"
|
||||
lore:
|
||||
- ""
|
||||
- "&e✯ Comprar el VIP para utilizarlo!"
|
||||
Reference in New Issue
Block a user