UploadedApr 14, 2019
Supported Bukkit Versions
Be aware : From Spigot/Bukkit 1.13 and above a lot of item names changed "name".
If you are going to use this newer version be aware to update all your command files, where an item is used. To make it faster,
it's possible only add the prefix "LEGACY_" before any item. Example "LEGACY_WATCH". (But maybe it doesn't work in any circumstance).
1.) Added a way to generate iconmenu interfaces faster directly from the game.
Using : /mycmd-edit command_name generateiconmenu , the command will get every icon in the user inventory and transform them in usable script lines for "iconmenu_commands" config line. Support itemnames,enchantments and lores. [!] Warning, this will override your old "iconmenu_commands".
2.) itemcost feature updates :
Itemcost now support multiple items ITEM_1:AMOUNT_1;ITEM_2:AMOUNT_2
Itemcost feature now support the displayed item name as parameter.
itemcost: IRON_SWORD:1:SUPER IRON SWORD;GOLDEN_CHESTPLATE:1:&eULTRA ARMOR
3.)Added 2 new variables for PlaceHolder API
P.S: Variables with the underscore in the name aren't going to get recognized from papi. Already fixed this in the next plugin version, thanks to an user who got this to my attention.
3.1) Added PLAYERDATA_ERROR_MESSAGE language string in language.yml (it is used in some crucial check, so don't use strange characters here) Let me know if it is all fine.
4.) New placeholders :
$loc_direction (Works like $loc_yaw but returns with a written cardinal point North, South ecc)
$time (Show current server time)
5.) ICONMENU Changes and fixes:
Fixed IconMenu sometime not working as intended, like when the title was starting with "&0". This problem born with newer spigot version, and i don't know why. Made a workaround for fix it permanently(i hope)
Added %close% command line. Close the GUI without do anything.
Added iconmenu_mode command line. Allow you to use precreated or newer functionality to the iconmenu's GUI otherwise impossible to be done with the normal plugin usage.
Available options for iconmenu_mode :
- PLAYER_LIST (create a iconmenu filled with all the online players head)
-- custom placeholder who works only with PLAYER_LIST : $playerhead (return the name of selected player head).
create the command like you have already done in the past and it automatically update every * delaytimer seconds.
use <next> between your Item name, Title and Description to create multiple items, titles and description to show at every refresh of the task.
use delaytimer to adjust the refresh rate. delaytimer: 1 = 1 second for refresh.
I've made AIR Working in the Iconmenu, so you can use it to "empty" a position.
line example :
- 26:LEGACY_WOOL<next>PLAYER_HEAD<next>BARRIER<next>EMERALD<next>AIR:0:/launchacommand:Title1<next>Title 2<Next> Title3:Description1;still one<next> Description 2 ecc ecc ecc
Command example with multiple ITEMS, TITLES and DESCRIPTIONS
dynamiciconmenu: command: /dynamiciconmenu type: ICON_MENU iconmenu_size: 36 iconmenu_mode: DYNAMIC permission-required: false iconmenu_commands: - '0:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '1:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '2:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '3:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '4:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '5:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '6:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '7:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '8:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '9:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - 11:CLOCK:0:%stayopen%:&aServer time - $random_color$time:&bToday Date - &6 $todaydate - 13:BEACON:0:/mycmd:&6MyCommand:&eLaunch MyCommand - '15:ENDER_PEARL<next>ENDER_EYE<next>AIR:0:%stayopen%:???<next>!!!<next>AIR: ' - '17:YELLOW_WOOL<next>LIME_WOOL:4:/command_example: : ' - '18:LIME_WOOL<next>YELLOW_WOOL:5:/command_example: : ' - 19:BOOK<next>2,BOOK<next>3,BOOK:0:%stayopen%:$random_colorPage 1<next>$random_colorPage 2<next>$random_colorPage 3:1<next>2<next>3 - 22:1,IRON_CHESTPLATE<next>GOLDEN_CHESTPLATE;PROTECTION_ENVIRONMENTAL;1<next>DIAMOND_CHESTPLATE;PROTECTION_EXPLOSIONS;3:0:/command_example::Description;Line 2... - 25:BARRIER:0:%close%:Close this menu:&cClick here;&cto close - '26:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '27:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '28:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '29:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '30:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '31:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '32:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '33:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' - '34:LIME_WOOL<next>YELLOW_WOOL:5:%stayopen%: : ' - '35:YELLOW_WOOL<next>LIME_WOOL:4:%stayopen%: : ' delaytimer: 1
P.S. Currently the menu can be close only performing any action in it. Pressing ESC from the keyboard can't be detected from the API, so i can't see when a player close it. Just don't create dead end iconmenu's.
The other iconmenu_mode, PLAYER_LIST example below :
iconmenu_playerlist: command: /iconmenu_list type: ICON_MENU iconmenu_title: '&aOnline Player List &b($online)' iconmenu_mode: PLAYER_LIST iconmenu_commands: - '%openiconmenu%/banmenu $playerhead'
6.) TITLE command type updates :
Added fadein, fadeout and stay time. Put the time in (seconds)
title_test: command: /title_test type: BROADCAST_TITLE text: - "&aHello i'm &e$player" - "and i'm talking to you" title: fadein: 3 stay: 10 fadeout: 2 effect_type: 0
Also added a dynamic way to show the title, activated by using title.effect_type line. The effect 1 will print the message letter by letter.
dynamic_title_example: command: /dyntitle type: TITLE text: - "&aHello &e$player" - "This will be printed one letter at the time." title: effect_type: 1
P.S : I've looked into, and seems like the default way to show the titles is the dynamic mode. My mistake. Use effect_type: 0 to disable the dynamic effect.
7.) New Player Options Added :
%PlayerOptions%setItemInHandLore: &blore; and lores
nameandlore: command: /edititem type: RUN_COMMAND runcmd: - "%PlayerOptions%setItemInHandDisplayedName: $arg1" - "%PlayerOptions%setItemInHandLore: $arg2"
8.) Added BLOCK_PATTERN command type :
I was testing somethings and i ended up creating this poor version of a schematic like function. I made it pretty fast, so, find a use to it if you can.
Basically every letter correspond to a block. Use <up> or <down> to change the Y level.
The command will start putting blocks at the player targetting block.
This this will create a somesort of a little house.
pattern_material contains the material block to be used. In this example X = OAK_PLANKS ecc.
Any not recognized letter is translated in AIR. In this example i used the O for the AIR cause it's much cleaner.
blockbuild2019yeah: command: /pattern type: BLOCK_PATTERN pattern_material: - X:OAK_PLANKS - G:GLASS - C:COBBLESTONE pattern: - CXXXXXXC - XOOOOOOX - XOOOOOOX - CXXOOXXC - <up> - CXGXXGXC - XOOOOOOX - XOOOOOOX - CXXOOXXC - <up> - CXGXXGXC - XOOOOOOX - XOOOOOOX - CXXGGXXC - <up> - CCCCCCCC - COOOOOOC - COOOOOOC - CCCCCCCC - <up> - OOOOOOOO - OXXXXXXO - OXXXXXXO - OOOOOOOO P.S. there is no undo function, so, be careful if you are going to use that thing. Use it in open areas if you don't know what it do. I will implement it in future, for now it is just a usable test functionality.