Merge pull request #381 from rockyhawk64/v4

some new example panels
This commit is contained in:
RockyHawk 2025-07-14 09:21:37 +10:00 committed by GitHub
commit 2309348f73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 127 additions and 74 deletions

View File

@ -6,7 +6,7 @@
conditions: '%player_name% $HASPERM example.permission'
title: '&6Welcome to Our Server!'
type: dialog
has-exit-button: true
has-exit-button: false
escapable: true
columns: 1

View File

@ -8,9 +8,6 @@ title: 'Player Settings'
type: floodgate
floodgate-type: custom
commands:
- '[msg] &aSettings panel opened!'
layout:
'0':
- dropdown_language

View File

@ -4,35 +4,86 @@
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
# |------------------------------------------------------------------------
conditions: "%player_name% $HASPERM example.permission"
title: 'Template Panel'
type: floodgate # inventory, floodgate, dialog
commands: # Runs when the panel has been opened
- '[msg] panel has been opened'
title: 'Server Selector'
type: floodgate
floodgate-type: simple # Supports Floodgate Form (simple, custom)
floodgate-type: simple
layout:
0: # Executes logic from top to bottom items in the slot until conditions are met
- example_button1
- example_button2
0:
- hub_button
1:
- example_button2
- survival_button
2:
- skyblock_button
3:
- factions_button
4:
- minigames_button
5:
- comingsoon_button
items: # These are the components, separated from the order for flexibility and eliminates nesting
items:
example_button1:
name: 'Button condition has been met'
condition: '%player_name% %EQUALS RockyHawk'
hub_button:
name: '&a&lHub'
lore:
- '&7Return to the main lobby.'
- '&eClick to go to the Hub!'
actions:
commands:
- '[msg] &dColour Works'
icon-type: PATH #Some resource pack paths can be used for icons
icon-texture: 'textures/items/redstone_dust.png'
- '[msg] &aConnecting to Hub...'
icon-type: PATH
icon-texture: 'textures/items/emerald.png'
example_button2:
name: 'Click me to display a message'
survival_button:
name: '&2&lSurvival'
lore:
- '&7Explore the wilderness.'
- '&eClick to join Survival!'
actions:
commands:
- '[msg] &dColour Works'
icon-type: URL #URLs can be used for icons
icon-texture: 'https://example.com/image.jpg'
- '[msg] &2Connecting to Survival...'
icon-type: PATH
icon-texture: 'textures/items/iron_pickaxe.png'
skyblock_button:
name: '&b&lSkyblock'
lore:
- '&7Your own floating island.'
- '&eClick to join Skyblock!'
actions:
commands:
- '[msg] &bConnecting to Skyblock...'
icon-type: PATH
icon-texture: 'textures/items/apple.png'
factions_button:
name: '&c&lFactions'
lore:
- '&7Form alliances and battle.'
- '&eClick to join Factions!'
actions:
commands:
- '[msg] &cConnecting to Factions...'
icon-type: PATH
icon-texture: 'textures/items/diamond_sword.png'
minigames_button:
name: '&e&lMinigames'
lore:
- '&7Play fun mini challenges.'
- '&eClick to join Minigames!'
actions:
commands:
- '[msg] &eConnecting to Minigames...'
icon-type: PATH
icon-texture: 'textures/items/ender_pearl.png'
comingsoon_button:
name: '&8&lComing Soon'
lore:
- '&7New content arriving shortly.'
actions:
commands:
- '[msg] &7Coming soon...'

View File

@ -3,63 +3,68 @@
# | Official Panel v2.0
# | https://www.spigotmc.org/resources/command-panels-custom-guis.67788/
# |------------------------------------------------------------------------
conditions: "%player_name% $HASPERM example.permission"
title: 'Inventory Panel %commandpanels_session_player%'
type: inventory # inventory, floodgate, dialog
command: example player # command that can be used to open the panel. Args used for data, eg value of arg in the command at player -> %commandpanels_data_player%
commands: # Runs when the panel has been opened
- '[data] set example custom_value'
floodgate: floodgate_simple # Optional open a floodgate panel type if the player is a bedrock player
update-delay: 20 # How many ticks between each time panel is updated, 0 for no update. Updates do not parse logic
rows: 1
conditions: "%player_name% $HASPERM example.permission"
title: '&3&lServer Selector'
type: inventory
floodgate: floodgate_simple
rows: 3
layout:
fill: # Same as empty but allows for logic by being here
- example_empty_item
4: # Executes logic from top to bottom items in the slot until conditions are met
fill:
- background_glass
10:
- hub_item
12:
- survival_item
- creative_item
14:
- skyblock_item
16:
- minigames_item
items: # These are the items, separated from slots for flexibility and eliminates nesting
example_empty_item:
items:
background_glass:
material: BLACK_STAINED_GLASS_PANE
name: ' '
hub_item:
material: ENDER_PEARL
name: '&a&lHub'
lore:
- '&7Return to the main lobby.'
- '&eClick to go to the Hub!'
left-click:
commands:
- '[msg] &aConnecting to Hub...'
survival_item:
material: REDSTONE
name: "Your gamemode is Survival"
conditions: "%player_gamemode% $EQUALS SURVIVAL"
animate: item_frame_1
left-click:
requirements:
- '[vault] 1000'
commands:
- '[console] give %player_name% netherite_ingot 1'
fail:
- '[msg] &cYou need $1000.'
# If this item was chosen based on logic when opening the panel,
# commands will still execute from this item even with animations
creative_item:
material: LIME_WOOL
name: "Your gamemode is not Survival"
animate: frame_1
material: IRON_PICKAXE
name: '&2&lSurvival'
lore:
- '&7Survive and explore.'
- '&eClick to join Survival!'
left-click:
commands:
- '[msg] Left clicked the item'
right-click:
commands:
- '[msg] Right clicked the item'
- '[msg] &2Connecting to Survival...'
frame_1:
material: YELLOW_WOOL
name: "Your gamemode is not Survival"
animate: frame_2
frame_2:
material: ORANGE_WOOL
name: "Your gamemode is not Survival"
animate: frame_3
frame_3:
material: RED_WOOL
name: "Your gamemode is not Survival"
# Last frame of animations do not need animate value as it knows to go back to original item
skyblock_item:
material: GRASS_BLOCK
name: '&b&lSkyblock'
lore:
- '&7Your island in the sky.'
- '&eClick to join Skyblock!'
left-click:
commands:
- '[msg] &bConnecting to Skyblock...'
minigames_item:
material: SLIME_BALL
name: '&e&lMinigames'
lore:
- '&7Fun challenges and games!'
- '&eClick to join Minigames!'
left-click:
commands:
- '[msg] &eConnecting to Minigames...'