forked from AzureHanChen/DeluxeMenus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
421 lines (421 loc) · 16.4 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# DeluxeMenus 1.12.0 main configuration file
# 由MCBBS@AzureHanChen 汉化&由PCD小组协助部分汉化
# 此汉化按照 CC-BY-NC-SA 4.0 开放转载,汉化著作权归AzureHanChen所有
# 如果您想深入了解此插件,欢迎去MCBBS站内Wiki查询
#
# check_updates: <true/false>
# Should DeluxeMenus check if there are any updates available on Spigot and inform ops there is an update available.
# 是否会从SpigotMC获取更新
#
# ==============================================================
#
# PER ITEM PERMISSION AND PRIORITY INFO:
# 物品的权限和优先级设置:
#
# Per item permissions and priorities are optional.
# 每一项的优先级和权限是可选的
# High priority = 1, Lowest priority = 2147483647.
# 最高的优先级为1,最小的优先级是2147483647
# This allows you to show different items for a specific menu slot depending on the highest priority
# 你可以运用这个根据优先级从高到低显示不同的物品,如果
# item permission a player has. This makes your menus very dynamic :)
# 玩家拥有一个物品的权限,则显示优先级高的 这会使你的菜单非常动态
#
# You CAN NOT specify a permission without a priority!
# 不设置权限就不能设置优先级
# You CAN specify a priority without a permission.
# 您也可以在不设置权限的情况下设置优先级
# You should always create a low priority item without a permission which will act as the no permission
# 您应该在高的优先级(需要权限)下设置一个无需权限的低优先级的物品项
# item if a player does not have permission for any of the items that require permission, otherwise
# 如果玩家拥有较高优先级物品项目的权限,则优先显示高的,否则继续向下推演,直到有一个玩家能够满足 (此处经过较大润色处理)
# no item will be set in the slot if a player does not have permission for any of the permission items.
# 如果任何项目所需的权限玩家都没有,则此物品项目位置显示空物品
#
# ==============================================================
#
# GUI menu configuration:
# 菜单处的配置文件:
#
# You can create as many GUI menus you like.
# 你可以创建许多你喜欢的菜单
# Every menu name must be unique. There can not be duplicate menu names!
# 所有菜单名称必须是唯一的,菜单名称
# Players must have permission for a GUI menu to open one!
# 玩家必须拥有"deluxemenus.guimenu.菜单名称"的权限和菜单本身的金钱,权限等需求来打开菜单
# Ops should automatically have permission for any GUI menu.
# OP(即/op xxx)可无视"deluxemenus.guimenu.菜单名称"的权限限制
#
# Permission to open a GUI menu is: deluxemenus.guimenu.<menuName>
# 打开一个菜单的权限需求: deluxemenus.guimenu.菜单名称
#
# You specify the command which opens the GUI menu. Make sure this command
# does not conflict with any existing commands on your server!
# A GUI menu without an open command specified will not be loaded!
# (此段落一起翻译)在命令参数中必须指明打开的菜单
# 并且命令不能与服务器上的其他命令相冲突
#
# GUI menus configuration layout:
# 菜单的配置布局:
#
# gui_menus:
# <菜单名称>:
# menu_title: '<菜单标题>'
# command: <能够打开这个菜单的快捷名称,不可与其他命令冲突>
# inventory_type: '<菜单的GUI类型,默认CHEST,具体可去站内Wiki翻查>'
# open_requirement:
# requirements:
# <需求名称,随便>:
# type: <需求类型,具体可去站内Wiki翻查>
# <需求的参数>
# deny_commands:
# - '[message] 很抱歉您不能打开此菜单'
# size: <9的倍数,最大54>
# update_interval: <多少秒更新一次变量,物品必须有update: true 标签>
# items:
# <物品名称,随便>:
# material: <物品英文全大写ID / 数字ID>
# material: head-<玩家名称,也可以填写%player_name%>
# material: hdb-<HDB插件头颅ID> (需要插件 HeadDatabase)
# data: <物品的子ID>
# amount: <显示的数量>
# slot: <物品显示的位置,第一个为0,以此类推>
# priority: <物品优先级,建议配合view_requirement使用>
# view_requirement: <能看到此物品的需求,具体请参照Wiki>
# update: <true/false 将会根据菜单的update_interval参数更新变量>
# unbreakable: <true/false 设置此物品为不可破坏属性>
# hide_attributes: <true/false 是否隐藏物品属性,例如+x攻击力等>
# hide_enchantments: <true/false 设置此物品是否隐藏附魔属性,只显示"闪闪发光"的外表附魔>
# hide_effects: <true/false 设置是否隐藏药水的属性,例如速度I等>
# hide_unbreakable: <true/false 是否隐藏不可破坏属性的文字>
# banner_meta: (您可以重复叠加以达到符合您想要的效果)
# - <dyecolor>;<PatternType> (具体可去站内Wiki翻查)
# - 'RED;BASE'
# - 'WHITE;CREEPER'
# display_name: <你看到的物品名称,例如&e窝窝头,如果不写则显示末影珍珠,床等>
# lore:
# - '你可以在这里使用颜色代码,变量'
# - '%<any placeholder from Papi>% 将会显示此变量对应玩家的值'
# enchantments: 附魔名称你可以在这里找到: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
# - '<ENCHANTMENT>;<LEVEL>'
# - 'SILK_TOUCH;1'
# left_click_commands:
# - '[close]'
# left_click_requirement: <具体可去站内Wiki翻查>
# right_click_commands:
# - '[player] spawn'
# right_click_requirement: <具体可去站内Wiki翻查>
#
#
# 如果你不想往一个config.yml中挤入n个菜单,
# 请在此目录下创建一个gui_menus文件夹,然后逐一添加文件名称.yml:
#
# gui_menus:
# <菜单名称>:
# file: 'pcd.yml'
#
# This allows you to keep your config clean and not have tons of GUI menus cluttering it.
# 这可以让强迫症患者瞬间舒适,也可能看起来更干净不那么凌乱
# The file format the GUI menu is loaded from must end in .yml
# 如果你想使用这种方式加载菜单,那么菜单文件必须以.yml结尾
# GUI menus loaded from other configuration files must follow a specific format as well...
# 用这种方式加载菜单,菜单也必须按照此格式编写,请注意空格,...
# To get started loading GUI menus from different files, simply create a GUI menu in this config and specify the file it will load from.
# (作者碎碎念)先用此格式创建一个菜单,
# After that is done, use /dm reload and DeluxeMenus will create a folder and file specific to the GUI menu you specified.
# 完成后,使用/dm reload,你将会在gui_menus文件夹内看到你创建的菜单,开始编辑吧~
# If the file specified is created by DeluxeMenus (because it did not exist), a default GUI menu layout will be saved to that file.
# 只要插件找不到菜单对应的文件,就会自动生成一个默认格式的文件
# From here you can edit it to your liking and use /dm reload to update your GUI menu!
# 您可以根据您的喜好编辑您的菜单并随时使用/dm reload重载菜单
#
# This loading from external config files is only available for gui menus and will not work for click menus yet....
# 从外部加载配置文件仅仅只能用于GUI菜单,单击菜单不可以?(此处存在歧义)
#
# 这个一个标准的旗帜选项
# banner_meta:
# - <旗帜颜色>;<旗帜类型>
#
# 旗帜颜色你可以在此处找到: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/DyeColor.html
# 旗帜类型你可以在此处找到: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/banner/PatternType.html
# ==============================================================
#
# !!!(下文与站内Wiki完全撞车,请去站内Wiki查找)!!!
# Requirement information
#
# Requirements can be set as the following:
#
# open_requirement: This requirement is checked when a menu is opened
# view_requirement: This requirement determines if an item should be set in a menu slot
# left_click_requirement: This requirement is checked when an item is left clicked
# right_click_requirement: This requirement is checked when an item is right clicked
#
# Requirement types:
# javascript - Evaluates a javascript expression that must return true or false
# configuration options:
# expression
#
# has item - Checks if a player has a specific item
# configuration options:
# material
# amount
# data
# name
# lore
#
# has money - Checks if a player has enough money (Vault required)
# configuration options:
# amount
#
# has permission - Checks if a player has a specific permission
# configuration options:
# permission
#
# string contains - Checks if a string contains another string
# configuration options:
# input
# output
#
# string equals - Checks if a string equals another string
# configuration options:
# input
# output
#
# stringequalsignorecase - Checks if a string equals another string ignoring case
# configuration options:
# input
# output
#
# > - Checks if a number is greater than another number
# configuration options:
# input
# output
#
# >= - Checks if a number is greater than or equal to another number
# configuration options:
# input
# output
#
# == - Checks if a number is equal to another number
# configuration options:
# input
# output
#
# <= - Checks if a number is less than or equal to another number
# configuration options:
# input
# output
#
# < - Checks if a number is less than another number
# configuration options:
# input
# output
#
# regex matches - Checks if a placeholder parsed string matches a regex pattern
# configuration options:
# input
# regex
#
#
#
# So why would we want to use requirements?
# By default, DeluxeMenus does not require a player meet any conditions to open your menu.
# If you want to require a menu need a certain permission node for it to be accessed, or a certain amount of money
# for a menu to be opened, You do that with an 'open_requirement'.
# Below is an example of how you would deny opening a menu if the viewer does not have permission:
#
# menu_title: 'Menu that requires permission to open'
# open_command: testmenu
# size: 9
# open_requirement:
# requirements:
# this_requirement_name:
# type: has permission
# permission: 'testmenu.open'
# deny_commands:
# - '[message] you do not have permission to open testmenu'
#
#
# Below is a full example of use cases for requirements:
#
# menu_title: 'Menu that requires permission to open'
# open_command: testmenu
# size: 9
# open_requirement:
# requirements:
# this_requirement_name:
# type: has permission
# permission: 'testmenu.open'
# deny_commands:
# - '[message] you do not have permission to open testmenu'
# items:
# mymenuitem:
# priority: 2
# material: DIRT
# slot: 0
# name 'You dont have 100 diamonds to view this item'
# mymenuitem:
# priority: 1
# material: DIAMOND
# slot: 0
# name 'You have lots of diamonds so you can see this item'
# view_requirement:
# requirements:
# diamond_requirement:
# type: has item
# material: diamond
# amount: 100
# left_click_requirement:
# requirements:
# money_requirement:
# type: '>='
# input: '%vault_eco_balance_fixed%'
# output: 1000
# deny_commands:
# - '[message] you only have %vault_eco_balance_fixed%'
# left_click_commands:
# - '[message] you have over 1000 dollars!'
# right_click_requirement:
# requirements:
# staff_requirement:
# type: string equals
# input: '%vault_rank%'
# output: staff
# deny_commands:
# - '[message] you are not staff'
# right_click_commands:
# - '[message] you are staff'
#
# deny_commands: are optional and will be executed if the requirement is not met.
# ==============================================================
#
#
# You do not need to specify item options that you don't use!
# The only required entries for a gui menu item to be valid are:
#
# A valid material
# A valid slot
#
# Every item in the items list must have a unique <item identifier>
#
# If you choose to update placeholders for a specific item, you must specify update_interval: <time>
# in the GUI menu options for the specific GUI menu.
# Only GUI menus with at least one item that has update: true will update those specific items placeholders.
#
# Every click_command must start with a specific identifier to know what to do for the execution.
# Valid click_command identifiers:
#
# [console] - Execute a command from the console
# Usage: - '[console] <command with no slash>'
#
# [player] - Execute a command for the menu viewer
# Usage: - '[player] <command with no slash>'
#
# [commandevent] - Fire a PlayerCommandPreprocessEvent for commands that do not use the bukkit command system
# Usage: - '[commandevent] <command with no slash>'
#
# [message] - Send a message to the menu viewer
# Usage: - [message] <message to send to the player
#
# [broadcast] - Broadcast a message to the server
# Usage: - '[broadcast] <message>
#
# [chat] - Send a chat message as the player performing the action
# Usage: - '[chat] <message>
#
# [openguimenu] - Open a GUI menu (can only be used in GUI menu click_commands)
# Usage: - '[openguimenu] <guiMenuName>'
#
# [connect] - Connect to the specified bungee server
# Usage: - '[connect] <serverName>'
#
# [close] - Close the viewers open menu
# Usage: - '[close]
#
# [refresh] - Refresh items in the current menu view
# Usage: - '[refresh]
#
# [broadcastsound] - Broadcast a sound to the server
# Usage: - '[broadcastsound]
#
# [sound] - Play a sound for a the specific player
# Usage: - '[sound]
#
# [takemoney] - Take money from a player (requires Vault)
# Usage: - '[takemoney] <amount>
#
# [json] - Send a json message to the menu viewer
# Usage: - '[json] {"text":"message"}'
#
#
#
# You can delay any of the click command being performed by ending the command with
# <delay=(time in TICKS)>
# example:
# - '[close]'
# - '[message] it has been 5 seconds since the menu closed!<delay=100>'
# - '[message] it has been 10 seconds since the menu closed!<delay=200>'
#
# A delay should NOT be added to the [close] or [openguimenu] actions
# as it could potentially cause unknown issues or glitches with menus.
debug: false
check_updates: true
gui_menus:
example:
menu_title: '&a一个例子菜单'
open_command: pcd
size: 9
open_requirement:
requirements:
permission:
type: has permission
permission: pcd.azurehanchen
deny_commands:
- '[message] 抱歉,您没有权限打开此菜单'
items:
'1':
material: head;%player_name%
slot: 0
display_name: '&a嘿! &f%player_name%'
lore:
- '&a这只是一个例子菜单'
left_click_commands:
- '[close]'
right_click_commands:
- '[player] help'
- '[close]'
'2':
material: DIRT
data: 0
amount: 1
slot: 1
priority: 1
view_requirement:
requirements:
permission:
type: has permission
permission: pcd.qiufengcanye
display_name: '&b点击给予秋风一套女装'
lore:
- '&b点击给予秋风一套女装'
left_click_commands:
- '[console] give AndyYu168 minecraft:diamond_chestplate 1'
- '[console] say 恭喜 秋风残叶 喜提女装一套'
- '[close]'
right_click_commands:
- '[console] give AndyYu168 minecraft:diamond_chestplate 1'
- '[console] say 恭喜 秋风残叶 喜提女装一套'
- '[close]'
'3':
material: DIRT
data: 0
amount: 1
slot: 2
priority: 2
display_name: '&b在,号8要了?'
lore:
- '&b恭喜你获得秋风的祝福'
- '&b点击sa了AHC'
click_commands:
- '[console] kill AzureHanChen'
- '[close]'