Skip to content
RedstoneFuture edited this page Dec 16, 2024 · 14 revisions

Overview

To increase user-friendliness, MissileWars provides several menus for different applications. A distinction is made between the "Hotbar Menu" and "Inventory Menu" types.

Game-Join Menu

Menu-Type: Hotbar Menu

Screenshot

The Game-Join Menu is automatically opened in the game-phase "Lobby" after entering, and can be freely configured.

Configuration

The structure of the item configuration is inspired by the well-known plugin DeluxeMenus.

menus:
  hotbar_menu:
    game_join_menu:
      items:
        team_selection:
          display_name: '&eTeam Selection'
          material: '{player-team-item}'
          slot: 2
          priority: 0
          lore:
          - '&2Right click to open the'
          - '&2team selection menu!'
          left_click_actions: []
          right_click_actions:
          - '[player-cmd] mw teammenu'
        […]
Config section Input-Format Description
display_name String the display name of the item
material String the Bukkit Material name of the item
slot Integer (0 - 9) the target slot for the item
priority Integer the display-priority for the View-Requirement (default: 0)
view_requirement requirement the View-Requirement (optional, default: NULL)
lore List of Strings the item-description aka. "lore" (default: empty)
left_click_actions List of Strings the action definition for an item left-click (default: empty)
right_click_actions List of Strings the action definition for an item right-click (default: empty)

Display-Name & Lore

  • The display-name and lore definition supports PlaceholderAPI placeholders

Material

  • The material definition supports the {player-team-item} placeholder to replace it with LEATHER_HELMET in the team color
  • The material definition also supports Player Heads using basehead-<base64 key>

Slot

Hotbar-Slots

Priority & View-Requirement

          […]
          view_requirement:
            type: string equals
            input: '%missilewars_lobby_mapvote_state_this%'
            output: RUNNING
          […]
  • The View-Requirement allows you to configure a condition for when the item is displayed: If the condition is not fulfilled at runtime, the next item for the slot is checked. All items are checked in descending order according to the Priority.
  • The View-Requirement definition also supports PlaceholderAPI placeholders

Requirement Types:

Requirement Type Description
has permission Checks if the player has the specified permission
!has permission Checks if the player has not the specified permission
string equals Checks if input matches output (Case sensitive)
!string equals Checks if input matches not output (Case sensitive)
string equals ignorecase Checks if input matches output (Case insensitive)
!string equals ignorecase Checks if input matches not output (Case insensitive)
string contains Checks if input contains output (Case sensitive)
!string contains Checks if input contains not output (Case sensitive)

Click-Actions (Left / Right)

  • Syntax of action specification: <action type> <definition>
  • The action definition supports the %prefix% placeholder
  • The action definition also supports PlaceholderAPI placeholders

Action Types:

Action Type Description
[player-cmd] execute a player command
[console-cmd] execute a console command
[player-msg] send a message to the player
[game-msg] send a broadcast-message to all players in player's game
[team-msg] send a broadcast-message to all players in player's team
[server-msg] send a broadcast-message to all players in the server

Team-Selection Menu

Menu-Type: Inventory Menu

Screenshot

The Team-Selection Menu allows you to select the new team (via /mw change <1|2|spec> command execution). It can be opened with a command and opens automatically in the game-phase "Ingame" when a player enters the game in the spectator-team.

Command: /mw teammenu

Permission:

  • mw.teammenu - Permission to open the menu
  • mw.change.team.player - Permission to see the two "player-team" items
  • mw.change.team.spectator - Permission to see the "spectator-team" item

Configuration

This inventory menu is specialized for its application and is therefore basically predesigned. It can only be partially customized.

menus:
  inventory_menu:
    team_selection_menu:
      title: '&eTeam Selection Menu'
      team_item: '{player-team-name}'

Team-Item

  • The Team-Item definition supports the {player-team-name} placeholder to replace it with the display-name of the displayed team button

Map-Vote Menu

Menu-Type: Inventory Menu

Screenshot

The Map-Vote Menu is used for the map-vote and activated if several arenas are available for the lobby and the map_choose_procedure setting in the lobby-config is set to MAPVOTING. It can be opened in the game-phase "Lobby" with a command. The menu allows the corresponding map to be voted by clicking on it (via /mw vote <arena> command execution) and shows the percentage vote status.

Command: /mw mapmenu

Permission:

  • mw.mapmenu - Permission to open the menu

Configuration

This inventory menu is specialized for its application and is therefore basically predesigned. It can only be partially customized.

menus:
    map_vote_menu:
      title: '&eMap Vote Menu'
      map_item: '&e{arena-name}'
      vote_result_bar: '&7{vote-percent}%'
      navigation:
        backwards_item:
          active: '&eprevious page'
          inactive: '&7previous page'
        forwards_item:
          active: '&enext page'
          inactive: '&7next page'

Map-Item

  • The Map-Item definition supports the {arena-name} placeholder to replace it with the display-name of the displayed arena button

Vote Result-Bar

  • The Vote Result-Bar definition supports the {vote-percent} placeholder to replace it with the percentage vote amount for the represented arena-vote