Resource icon

MCMenu 1.1.0

Compatible API Versions
1.0.5
Sourcecode
https://github.com/kongkongye/mcmenu
Contributors
kongkongye
Dependencies

Functions

  • several ways to get menu item
  • support global params(PlaceholderAPI)
  • can config menu-operating sounds
  • can config multiple menus
  • tree structure menu, can nest any levels of sub menus
  • can config menu display format
  • develop api support

Commands

tip: <param> mean required param, [param] mean optional param
  • /mcmenu reload: reload plugin
  • /mcmenu get <menu name>: get the menu
in most cases, you don't need to use the commands below manually:
  • /mcmenu join <menu name> [slot]: join menu,if menu slot is not specified, then the slot of current menu will be used, if no current menu, then will use the current slot
  • /mcmenu left: move left
  • /mcmenu right: move right
  • /mcmenu confirm: confirm
  • /mcmenu back: back
  • /mcmenu exit: exit

Permissions

  • /mcmenu reload: can be send by console or op
  • other commands: don't need permission

How-Tos

how to get menu?
  • op get the menu by command, then give them to players by shop of the server or other methods(recommend)
  • player get the menu directly
  • develop method:
    Code:
    McMenuApi.getItemManager().saveMenuInfo(item, menuName)

how to use menu?
  • place menu item in quickbar
  • enter menu/confirm: click menu item
  • back: click 8'th slot of quickbar
  • exit: move to exit
  • move left: click first slot of quickbar
  • move right: click 9'th slot of quickbar

Config

the real config used is config.yml and lang.yml

Code:
#get menu method
get:
  #whether allow player to get menu by command(/mcmenu get <menu name>)
  #(OP is always allowed)
  cmd: true

#exit menu method
exit:
  #exit on movement
  move:
    enable: true
    #move distance,double value,>=0
    distance: 0.5
  #exit on open inventory
  openInventory:
    enable: false

#menu item display
lore:
  #menu item flag, color char & is allowed
  check: "&e+&aMenu&e+"
  #item title, color char & is allowed, {menu} represents menu name
  title: "&a{menu}"
  #description list, color char & is allowed
  descriptions:
    - "&eplace menu item in quickbar"
    - "&eenter menu/confirm: &7click menu item"
    - "&eback: &7click 8'th slot of quickbar"
    - "&eexit: &7move to exit"
    - "&emove left: &7click first slot of quickbar"
    - "&emove right: &7click 9'th slot of quickbar"
  #line of menu name, color char & is allowed, {menu} represents menu name
  menu: "&7({menu})"

#display
#avaiable display bars:
#  title: title in the center of screen
#  subTitle: sub title in the center of screen
#  tip: below subTitle
#  actionbar: below tip
#  popup: below actionbar
#  chat: chat window
display:
  #words limit, format is 'display-bar-name limit', default is no limit
  limit:
    - "title 16"
    - "subTitle 32"
    - "tip 64"
    - "actionbar 64"
    - "popup 64"
  #content refresh, format is 'display-bar-name interval(unit is tick)', default is no refresh
  #some display will fadeout, so refresh is needed
  refresh:
    - "title 60"
    - "subTitle 60"
    - "tip 30"
    - "actionbar 30"
    - "popup 30"
  bar:
    #main display bar, is used to display menus
    main: "subTitle"
    #sub display bar, is used to display description
    sub: "actionbar"
  #display format
  format:
    #prefix of menus line, color char & is allowed
    start: ""
    #suffix of menus line, color char & is allowed
    end: ""
    #separator of menus line, color char & is allowed
    separator: " &c| "
    #format of current menu, {content} represents menu content, color char & is allowed
    current: "&a{content}"
    #format of not current menu, {content} represents menu content, color char & is allowed
    notCurrent: "&7{content}"
    #format of description, {content} represents menu description, color char & is allowed
    description: "&e{content}"

#sound(operate feedback,only called by operate using quickbar)
sound:
  #double value
  volume: 1.0
  #double value
  pitch: 1.0
  #sound on joining menu, optional
  join: "RANDOM_ORB"
  #sound on moving left, optional
  left: "RANDOM_POP"
  #sound on moving right, optional
  right: "RANDOM_POP"
  #sound on confirm, optional
  confirm: "RANDOM_POP"
  #sound on back, optional
  back: "RANDOM_POP"
Code:
#file name is 'menu-name.yml'

#is loop, when true, move right on last will turn into first, move left on first will turn into last
loop: true

#global params using PlaceholderAPI plugin, please refer to https://nukkitx.com/resources/placeholderapi.104/ for details
menus:
    #menu name, global params is allowed
  - name: "teleport"
    #menu description, optional, global params is allowed, color char & is allowed
    description: "teleport function"
    #command (execute when confirm, / prefix is not needed),optional
    command: ""
    #mode, take effect on command success (no operation on command fail), default is exit
    #  stay: idle
    #  back: back
    #  exit: exit
    mode: "exit"
    #sub menus(join sub menus on confirm), optional
    sub:
      - name: "spawn"
        description: "teleport to spawn"
        command: "spawn"
      - name: "back"
        description: "back to last teleport location"
        command: "back"
      - name: "home"
        description: "back to home"
        command: "home"
  - name: "menu reload"
    command: "mcmenu reload"
  - name: "pet"
    command: "pet"
  - name: "welcome"
    description: "&a%player% &7(&d%player_ping%ms&7)"

ScreenShots



  • Like
Reactions: DimBoy
Author
kongkongye
Downloads
1,183
Views
3,463
First release
Last update
Rating
0.00 star(s) 0 ratings
Top