MyCommand icon

MyCommand -----

Make your own, customized Minecraft commands




MyCommand 5.7.4 Changelog :

Built with Spigot 1.20.1 APIs

PlaceholderAPI implementation now uses the OfflinePlayer instance.
Anvil_GUI commands updated to work with 1.20.1 servers.
IconMenu fix.
Minor changes.

New PlayerOptions:
setExpCooldown , sendHurtAnimation

New placeholder
$getexpcooldown
----------, Jul 4, 2023

Let's release it, otherwise it will remain on my pc until 2023.

Added MiniMessage chat format to be used if you like it. You can achieve rawtext like results, but in a more cleaner way, and probably with less problems.

For this release you can use it in 2 way. The first one is to put as a type MINIMESSAGE, instead of TEXT, and write your messages under the text field. The other one, is to be used inside the RUN_COMMAND type, and here, you have to use the $mm$ prefix, like you'll already do for the $text$ one. Note, console support is there, but the message will appears without formatting.

Example of use :

Code (Text):
minimessagetest:
  command: /mm
  type: MINIMESSAGE
  text:
  - Hello <rainbow>$player</rainbow>, isn't <underlined>MiniMessage</underlined> fun?
  - "<color:#FF5555>This is a <color:#55FF55>test!"
  - ecc ecc
With RUN_COMMAND :

Code (Text):
minimessagetestruncmd:
  command: /mmr
  type: RUN_COMMAND
  runcmd:
  - /time set day
  - $mm$Hello <rainbow>$player</rainbow>, isn't <underlined>MiniMessage</underlined> fun?
AnvilGUI:
Dropped 1.18.2 AnvilGUI support, added 1.19.1 and 1.19.2 instead.

Scoreboard:
Scoreboards can now display more characters on 1.13+ servers.

RawText:
You can now change the RAW_TEXT character needed to split the various part in config.yml

Code (Text):
REGEX:
  RAW_TEXT_SPLITTER: ";"
PlaceholderAPI related :
You can now use brackets on the playername part of %mycommand_playerdatafor_[<player_name>]_<variable_name>% papi placeholder.
This change, make it possible the use of "underscores" in playernames without problem.


Commands in general (RUN_COMMAND):

file config.yml:
Code (Text):
RUN_COMMANDS:
  SENT_BY_CHAT: true
Until now, commands in MyCommand always got sent as a chat message. (to make unregistered commands work)
Lately with all the changes in Minecraft, sending chat colors inside a message results in a "Illegal chat character" kick message (in paper based servers).
To workaround this, i've added a way to make all the commands, listed in your runcmd list, to be performed as a command and not a chat message.
If you choose this way, every command must be registered to work (and you can use the auto register feature from the last release). Of course, if this is enabled, non-registered commands in a runcmd list will not be performed.
The second solution is the added prefix $PERFORM_COMMAND$, to be used before the command you want to run as it.
----------, Sep 4, 2022

MyCommand 5.7.2

Added in config.yml (by default)
Code (YAML):
COMMANDS:
  AUTO_REGISTER
: false
  DEFAULT_DESCRIPTION
: "Registered MyCommand Command"
Added the following command field:

Code (YAML):
command_description : "My Registered Command"
to be able to change the default command description shown in the helps ecc, when the command is registered.

Fixed SIGN_MENU not working in 1.18.1

The ANVIL_GUI is now using another "core", which means that some things have changed. Now works in 1.18.1
Currently supported server versions are 1.8, 1.15, 1.16 and 1.18
anvil_left_item / right, is dropped for now, can't work in the new system.


The Scoreboards now uses Teams. Now the flickering should be gone.
You can expect some flicker if you update the "score", because the only way to update it is to remove the old line and adding a newer one. There's nothing i can do there. Editing the score directly didn't worked for me, i'll retry in future.
the scoreboard update process now stop if a player quit/is kicked
Known issue: if the command name is shorter than 16 chars it will not work. I will release a fix to that in those days.



Added $COPY_TO_CLIPBOARD$ prefix for RAW_TEXT
and $CHANGE_PAGE$ to be used with RAW_BOOK command type :

Example :

Code (YAML):
"$CHANGE_PAGE$Go to page 3;Click here to jump to page 3;3"
RAW_BOOK added <br> to be used as \n (new line) feature, considering \n is not working anymore by default.. idk.

Fixed the regex filter, not activating correctly.


runcmd's :

Fixed %PlayerData%var.addlist= priority.

$arg's now get replaced with all $rawtext$ $log$ ecc types.

%TempVariable% can use other %TempVariable% as source.

Added a way to replace %TempVariable% inside other placeholders. Example :
Code (YAML):
TempVars :
- ' %TempVariable%$pname=$player'
- ' %TempVariable%$test4=[Replace]%player_ping_$pname%'
- '$text$ 4 = $test4 '
Using [Replace] before the papi placeholder as in the example, will replace first the tempvariable, and then the papi one.



Revamped /mycmd region. Old location needs to be updated, it was missing the world name... Open othersdb.yml and add the worldname before the coordinates.
Now works as intended. Added /mycmd region sm and /mycmd region tpto



Added

%PlayerOptions%setPlayerListHeader: texthere
%PlayerOptions%setPlayerListFooter: andhere


ExtraListener:

Are now registered individually. If you use only the Join, only join is registered, as it has to be.

Added:

setJoinMessage and setQuitMessage respectively for PlayerJoin and PlayerQuit

Code (YAML):
PlayerJoin:
  active
: true
  setJoinMessage
: "$player joined the server."

PlayerQuit
:
  active
: true
  setQuitMessage
: "$player leaved."
$log$ feature now saves correctly in the log file choosen with "log_filename: filename.log" command field, when used from the console.
in-game /mycmd list (types) are displayed better.
----------, Jan 1, 2022

Fixed a NPE using "/mycmd-reload all" while having TAB_SUGGESTION_BLOCKER_LISTENER on false


Added $delay$ support in playerevents.yml / blockset / npcs / holograms ... and related features.

Some minor adjustments to "/mycmd" menu

Scoreboards:

Fixed NPE which prevented them to work at all.

Now they're updated asynchronously.
Changed how it updates, now it's less lickely to see the board flicker.
Improved the marquee effect, now takes with him the latest color.

Added scoreboard_title. Create custom animations easily line per line.

Code (YAML):
 scoreboard_title :
  - '&b» &3&lLine 1 &b«'
  - '&b» &3&lLine 2 &b«'
  - 'ecc ecc '
runcmd:

Changed how $multiargs replace things after an $argX
Fixed playerdata list .contains in mysql mode.
Fixed TempVariables + and - not being recognized.
execute_mode FROM_ANOTHER_COMMAND grants access per line.

Iconmenu:

Fixed POTION type without rgb colors returning error
Added <rightclick> in iconmenu commands. (Still need more work).

Add iconmenu_options command field to activate it.

Code (YAML):
iconmenu_options :
- ALLOW_RIGHT_CLICK
Example :

Code (YAML):
 iconmenu_commands :
 - 1:EMERALD:0:/leftcmd<rightclick>/rightcmd:Example Title:Press left for X;And right for Y



Added OVERLAY command type. What it does? Nothing. Why's there?
You can put this on other plugin commands, and use it in conjunction of "overlay: true" command field to use, as example, features like execute_mode on other plugin commands, and block the execution of that command in specific case.
The OVERLAY command type, basically is here to accept it as a valid command, but, show nothing as feedback, because it does nothing.

Code (YAML):
blockanotherplugincommand:
  command
: /lmcmd
  type
: OVERLAY
  execute_mode
: FROM_ANOTHER_COMMAND
  overlay
: true
----------, May 7, 2021

Changelog of MyCommand 5.7.0


Built-in TAB Completer Command hider: (Do not work on older server version)
Added a built in way to hide TAB suggestions. Check the file tabsuggestionblocker.yml

Regex:
Fixed the Regex filter not working properly (working at all)

Registered commands (register: true):
It's now possible to easily add aliases to a registered command.

Add the "aliases" field under your interested command:

Code (YAML):
aliases_example:
  command
: /vote
  register
: true
  aliases
:
 - /v
  - /voting
  - /ecc
Playerdata's:
Added a way to convert flatfile files into mysql.
Use the command "/mycmd-playerdata convert_flatfile_to_mysql" to start the process

MYSQL:
Fixed an error occurring on newer version of paper.
Added:
"MYSQL:
USE_NEWER_DRIVER: false" in config.yml
if true use "com.mysql.cj.jdbc.Driver" instead of "com.mysql.jdbc.Driver"

By default is false for now. If in future it get removed, you can switch manually to the new one.



execute_mode feature:

Added : execute_mode_bypass_node: permission.to.bypass
Added in language.yml :
SKIPPED_EXECUTE_MODE: "&eYou've skipped the command execution mode check."

LIVE_CHAT command type:

  • answer can now be "*", in this way can accept any value (if you just want to use it as a prompt.
  • Added escape-parameter: "quit" , to add one more word to quit/escape from the LIVE_CHAT.
  • Added exit-message: "You've left the prompt" Costumize the message when leaving.
  • Added incorrect-answer: "&cIncorrect answer. Type &4close &cto quit this prompt"

ICONMENU's:
playerheads are now cached.

Added $BCPlaceHolder%server_name%placeholder_name% <
Needs to work in conjunction of MyCommand for BungeeCord and another intermediary plugin to the target server, but i've realized the pluginmessage channel doesn't work without players connected to the target server. In conclusion it's here if called, but currently non usable.


NPCs:

  • Added /mycmd-npcs silent <id> <on|off> (Turn off the villager sounds)
  • Added /mycmd-npcs age <id> <adult|baby> (Set the age of a villager)
  • Added /mycmd-npcs equipment <id> <hand> <material_name> (Set an item in their hands)
  • Added /mycmd-npcs temptp <id> <world> <x> <y> <z> or /mycmd-npcs temptp <id> <world> <x> <y> <z> <yaw> <pitch>

/mycmd locations
Changed the way locations are saved. The built-in Location save feature of spigot gives error just for having an unloaded world location in otherdb file even if the plugin is not using it. Plus i don't need to put Multiverse and similar as dependencies.

Added TELEPORT command type.
Teleport command type is a easier way to create tp commands, without using %PlayerOptions%teleport. Use "/mycmd location create <name>"
Added location_name : name

Example :
Code (YAML):
teleporttest:
  type
: TELEPORT
  location_name
: spawn
  command
: /tptospawn

HTTP GET REQUEST is now made asynchronously.

Added:

Type can be : BALL, BALL_LARGE, BURST, CREEPER, STAR
"%PlayerOptions%spawnCustomFirework TYPE R,G,B R,G,B POWER" -> "%PlayerOptions%spawnCustomFirework BALL 255,0,0 0,0,255 3"
you can test it with /mycmd playeroptions spawnCustomFirework ...


Added in config.yml

If you want disable the hook at all, you can :
HOOKS:
PLACEHOLDER_API: true
PROTOCOLLIB: true

You can now change or remove the message sent by the broadcast radius feature :

language.yml

Added
BROADCAST_RADIUS_NOT_FOUND: "&cNo one received this message"

config.yml

TEXT_OPTIONS:
BROADCAST_SHOW_NO_PLAYER_FOUND: true

runcmd:

It's now possible use $arg1 with $multiargs with text_to_specific_player
- '$text_to_specific_player%$arg1% $multiargs'
----------, Apr 17, 2021

NOTE FROM 5.6.7. PLAYERDATA flatfile(yml) needs to be converted. If you're using a version older than 5.6.7, before updating to 5.6.8, check the changelog of the 5.6.7 to see how to convert the yml database (no MySQL users)

MyCommand v5.6.9 changelog list :
5.6.9b hotfix -> Fixed a problem that prevented the plugin from being loaded without Vault installed.
also added a little utility /mycmd locations (if you need to create a "warp" in a server without other plugins. aka essentials.)



tab_completer "character based (default mode)", now returns results without checking if it's upper/lowercase


Regex filter:

Added in config.yml an easy way to easily disable the global filter. (By default is on).
Code (YAML):
REGEX:
  USE
: true
  PATTERN
: "^[-a-zA-Z0-9&._ ]+"
Added per command regex filter :

Customize the allowed characters a player can type into that command.
Code (YAML):
regex_pattern : "^[0-9]+"
regex_error_message
: "Only numbers are allowed"

MyCmd Images :
Apply custom images to maps and eventually use them in the itemframes. Images need to be located in /MyCommand/images/ folder 128x128.png files.

  • /mycmd mapimage (Permission : mycommand.mapimage)


MyCmd Regions :
Create simple cuboid regions to be used in a command to check if a player is into it. (Like WG, but without WG).

/mycmd region

Added
Code (YAML):
allowed_mycmd_regions :
 - region1
  - region2
Added $mycmdregionname placeholder. return with the name of the mycmd region the player is in.



Added $get_ip placeholder. Differently from the already existing $getaddress, this only show the IP without the port.


Added
placeholders_replace_mode: NO_REPLACE
placeholders_replace_mode: NO_PLACEHOLDER_API

Added execute_mode: ITEMFRAME_ONLY

Events and other functions (ExtraListeners/Blockset/NPC/Holograms/ItemFrames/Signs)

- can now use Scripts line directly inside their area.
- can now use $rawtext$ , $rawbroadcasttext$ , $log$



Holograms are now spawned after the server is done loading, to prevent to trying to spawn them on unloaded worlds.
get_run_command now works with normal request and not only with get_json_string



New Command Type SIGN_MENU. (Require ProtocolLib !) Resource by :
FrostedSnowman



It will prompt up a sign edit menu where you can retrieve the text and run commands from it.
To open up a SIGN_MENU from a ICONMENU command type, use the usual prefix "%openiconmenu%" Example : "%openiconmenu%/signmenu", Inverse way, its not necessary.

Code (YAML):
sign_menu:
  command
: /signmenu
  type
: SIGN_MENU
  sign_commands
:
  - /say $line1 , $line2 , $line3 , $line4
  - /iconmenu $line1
  sign_layout
:
  - "&f"
  - "^"
  - "type in the name"
  - "of the whatever"

SIGN_MENU doesn't work on older server versions.
----------, Jan 30, 2021

NOTE FROM 5.6.7. PLAYERDATA flatfile(yml) needs to be converted. If you're using a version older than 5.6.7, before updating to 5.6.8, check the changelog of the 5.6.7 to see how to convert the yml database (no MySQL users)

MyCommand v5.6.9 changelog list :
tab_completer "character based (default mode)", now returns results without checking if it's upper/lowercase


Regex filter:

Added in config.yml an easy way to easily disable the global filter. (By default is on).
Code (YAML):
REGEX:
  USE
: true
  PATTERN
: "^[-a-zA-Z0-9&._ ]+"
Added per command regex filter :

Customize the allowed characters a player can type into that command.
Code (YAML):
regex_pattern : "^[0-9]+"
regex_error_message
: "Only numbers are allowed"

MyCmd Images :
Apply custom images to maps and eventually use them in the itemframes. Images need to be located in /MyCommand/images/ folder 128x128.png files.

  • /mycmd mapimage (Permission : mycommand.mapimage)


MyCmd Regions :
Create simple cuboid regions to be used in a command to check if a player is into it. (Like WG, but without WG).

/mycmd region

Added
Code (YAML):
allowed_mycmd_regions :
 - region1
  - region2
Added $mycmdregionname placeholder. return with the name of the mycmd region the player is in.



Added $get_ip placeholder. Differently from the already existing $getaddress, this only show the IP without the port.


Added
placeholders_replace_mode: NO_REPLACE
placeholders_replace_mode: NO_PLACEHOLDER_API

Added execute_mode: ITEMFRAME_ONLY

Events and other functions (ExtraListeners/Blockset/NPC/Holograms/ItemFrames/Signs)

- can now use Scripts line directly inside their area.
- can now use $rawtext$ , $rawbroadcasttext$ , $log$



Holograms are now spawned after the server is done loading, to prevent to trying to spawn them on unloaded worlds.
get_run_command now works with normal request and not only with get_json_string



New Command Type SIGN_MENU. (Require ProtocolLib !) Resource by :
FrostedSnowman



It will prompt up a sign edit menu where you can retrieve the text and run commands from it.
To open up a SIGN_MENU from a ICONMENU command type, use the usual prefix "%openiconmenu%" Example : "%openiconmenu%/signmenu", Inverse way, its not necessary.

Code (YAML):
sign_menu:
  command
: /signmenu
  type
: SIGN_MENU
  sign_commands
:
  - /say $line1 , $line2 , $line3 , $line4
  - /iconmenu $line1
  sign_layout
:
  - "&f"
  - "^"
  - "type in the name"
  - "of the whatever"


----------, Jan 28, 2021

MyCommand v5.6.8 changelog list :

NOTE FROM 5.6.7. P LAYERDATA flatfile(yml) needs to be converted. If you're using a version older than 5.6.7, before updating to 5.6.8, check the changelog of the 5.6.7 to see how to convert the yml database (no MySQL users)

IconMenu's Updates:

IconMenu's can now use $Script$ lines (like runcmd).
Now you can create iconmenue's who can differs by a statement. Check the example below to see how implement them.

Example of use (command by Kjettinge):
Code (YAML):
questscommand:
  command
: /quests
  type
: ICON_MENU
  iconmenu_size
: 18
  register
: true
  permission-required
: false
  iconmenu_title
: GlobalMining Quest
  iconmenu_commands
:
 - "$Script$%if%$PlayerData%RookieHunteFinished%==true"
  - 0:1,WRITTEN_BOOK:0:/warp quest1:§aRookie Hunter
  - "$Script$%else%"
  - 0:1,WRITABLE_BOOK:0:/warp quest1:§aRookie Hunter
  - "$Script$%if%$PlayerData%StartingHunterFinished%==true"
  - 1:2,WRITTEN_BOOK:0:/warp quest2:§aStarting Hunter
  - "$Script$%else%"
  - 1:2,WRITABLE_BOOK:0:/warp quest2:§aStarting Hunter
  - "$Script$%showall%"
  - 1:STONE:0:/showall:§aShow whatever the condition is


In Dynamic IconMenu's the scripts works when created (command called), but aren't going to update dynamically (a.k.a without closing and reopening the GUI).
A workaround to make something similar can be creating something like this (But still close and re-open the GUI):

Code (YAML):
  - "$Script$%if%$PlayerData%test123%==true"
  - 10:STONE:0: %openiconmenu%/mycmd-playerdata set $player test123 false;/mymenu:§cGO to false
  - "$Script$%else%"
  - 10:COBBLESTONE:0: %openiconmenu%/mycmd-playerdata set $player test123 true;/mymenu:§aGO to true
%openiconmenu% is adjusted to make this works.

In the example above, we run 2 commands directly from the GUI, the first one set a value to something, the second one reopen the same gui, to allow the updated scripts to kick-in.

P.S. The line "$Script$%showall%" make possible to show other results after an IF, without creating an useless if just to do that.


iconmenu_mode: PLAYER_LIST is now personalizable.
You can now set up Title and Description.
Code (YAML):

iconmenu_playerlist
:
 command
: /iconmenu_list
 type
: ICON_MENU
 iconmenu_title
: '&3Online Player List &8 (&9$online&8 )'
 iconmenu_mode
: PLAYER_LIST
 iconmenu_commands
:
- ' %stayopen%/say $playerhead:&b&lHead of $playerhead:&aPress here to run;&athe command >; ;/say $playerhead'
 

IconMenu's items can now use the CustomModelData value. This allow's you to use custom textured items from plugin like (ItemsAdder) into your IconMenu.
To use them place the numeric custommodeldata number right after the data id, splitted by a ;

Code (YAML):
  - 1:ITEM_NAME:0; <CUSTOM MODEL DATA ID HERE > :/test:Title:Description  - >
 - 1:ITEM_NAME:0;1:/test:Title:Description  ->
How to know what CustomModelData an item have? Try with "/mycmd tell $itemcustommodeldata"


PlayerData Updates:

/mycmd-playerdata has now a better tab_completer. Now show the section as they should be, and in flatfile it returns also with the list of variables of a player. (MYSQL not implemented).


Added "/mycmd-playerdata set allaccounts <variable> <content>"
-> This command allow's you to set a variable to all existing players. In MySql mode, this command will set the variable to players who already have that one set up.

Added "/mycmd-playerdata list <add | remove> <player_name> <variable> <content>"
-> Create lists of string to be saved.

Added $Script$%PlayerData%listname.addlist=stringtoadd
Added $Script$%PlayerData%listname.removelist=stringtoremove

Added $Script$%PlayerData%array1.contains=string2


The comparator ".contains=" and ".notcontains=" are updated to works on lists, and it looks only for exact results. So if you search for "hello", and in the list there is "hello hello", it return false, you need to search for the exact string line "hello hello".

Code (YAML):
containsexample:
  command
: /containsexample
  type
: RUN_COMMAND
  runcmd
:
 - $Script$ %if%$PlayerData%list1%.contains=$multiargs
  - $text$Correct!
  - $Script$ %else%
  - $text$NOOO!  

PlayerData Economy :

MyCommand can now be used as a basic Economy Plugin, using a playerdata value as storage. You need Vault to make it working.
new lines in config.yml (add them manually if you want use it, or generate a new config.yml):

Code (YAML):
ECONOMY:
  USE_MYCOMMAND_AS_ECONOMY_PLUGIN
: false
  PLAYERDATA_VALUE
: money
  SUFFIX
: "$"

Holograms Updates:

Added /mycmd holograms floatingitem <HoloName> <Material_name>
It spawns an Item on the top of a created hologram, no extra events needed. (maybe this one isn't working perfectly.. i forgot about it lol until this release)


Blockset Updates :

You can now run commands through ItemFrames. The item inside the itemframe must be contained in the right click enable one's of blockset.

/mycmd-blockset itemframe (Show the Help).

Added LISTENERS.ITEMFRAME_LISTENER: false in config.yml

Turn it on, to enable the feature.

Permissions : mycommand.itemframe.break

Miss features, but it is in a working state.


Misc Changes/Fixes:

Fixed "/mycmd-playerdata set" command creating playerdata/uuid.yml files also when the plugin is set to use MySql
Fixed CHAT_LISTENER custom command prefixes not working on new versions.
$player_list now doesn't return anymore with the names of non-visible players. If you are vanished to a player, for example, your name doesn't appears anymore in that list.
%PlayerOptionsFor% was not working.
Changed the order where PlaceHolderAPI replace it's placeholder. (DIDN't TESTED any scenario if anything is like before). This change will fix the problem with $PlayerData%VarIaBlE% not working if the name is Case Sensitive.
PlayerData's now will use long as a value instead of int, to allow greater numbers to be used.
LIVE_CHAT can now user $RUN_CONSOLE$

TAB_COMPLETER Updates:

Added tab_completer_display_mode

by default now is "CHARACTER_BASED", that means when you start typing in the word you want, the suggestions adjust to that word accordingly.
SHOW_ALL just throw at you everything all togheter.

Example:
tab_completer_display_mode: SHOW_ALL

Do not use this option at all if you want the other type, as i said, it's default now.


Added a regex filter to avoid users to input unsafe characters. By default is set to :

config.yml :

Code (YAML):
REGEX:
  PATTERN
: "^[-a-zA-Z0-9&._ ]+"
if you want to add for example, the /, just put it as "^[-a-zA-Z0-9&._ /]+" and so on.. Check on internet for better patterns.
If you don't want to use it, put PATTERN: ".*" and everything will pass.

language.yml

Code (YAML):
LANGUAGE:
  CHARACTERS_NOT_ALLOWED
: "&cYour input contains not allowed characters."

Misc changes and bugfixes.
----------, Dec 27, 2020

MyCommand 5.6.7

Playerdata values are now stored per player. If you're using any type of flatfile playerdata, you need to convert the older playerdata.yml into the new one's who are going to be located in the folder /playerdata/uuid.yml

To continue using your PLAYERDATA flatfile(yml) without losing your "playerdatas", you need to convert the old database into the new one :
Run the command : /mycmd-playerdata convert_to_new_flat_style

Misc:

PlaceHolderAPI should now remain hooked also after this one gets reloaded.
Hex Colors now works also on RAW message's (RAW_TEXT).
Fixed NPE while attempting to spawn holograms on unloaded worlds.
Fixed "iconmenu_autofill: BLACK_STAINED_GLASS_PANE" NPE if no other argument were given after the Itemname (EX. ITEM:0:true ecc)
Fixed POTION item types not being able to be used on 1.12 and older servers.
Execute-mode error-message now replace palceholders and colors.
Blocked Hex colors from getting replaced on servers older than 1.16
Made working some %PlayerOptions%setItemInHand commands on older server versions.
Fixed a NPE in the ItemCost function
Fixed %mycommand_cooldown_commandname% PAPI placeholder, now returns 0 if the command isn't in cooldown
iconmenu_type: WORKBENCH can now be used in all it's position 0 to 9 (0 = result, 1-9 recipe)
Added "%PlayerOptions%setCustomModelData: 123"
Added $itemcustommodeldata placeholder

Experimenting with Advancements : /mycmd telltoast <playername> message. (this command will broadcast a message inside the Advancement toast style notification). Works, but to unregister them, i need to reload the server data.

Added /mycmd opengui <player> <command_name> <args> (Open an iconmenu/anvil_gui directly from the console).

RUN_COMMAND_TASK now works from the console.

Added /mycmd-blockset cancelevent (If active, cancel any event from getting triggered. Ex. If you use a CHEST and put this on true, the chest doesn't open)

Added $world_time (placeholder)

Added %skip% for the HOVER PART of a RAW_TEXT. Using %skip% will prevent the popup to show at all.

Scheduler :
You can now run command only at the server start(mycmd start), by using "start" in the date:
/mycmd-scheduler add mylist date start


playerevents.yml ------->

Added PlayerChangedWorld. Triggers when a player change world.

Code (YAML):

PlayerChangedWorld
:
  active
: false
  execute
:
  - '$text$&aWorld changed &8 (&2$world&8 )'

Added a condition feature to the tab_completer. Example <pos_1=give>, in this case if the typed word at the position 1 is give, the selected word (money) will show in the suggestions.

Code (YAML):
tab_completer_test2:
  command
: /customtab
  type
: RUN_COMMAND
  runcmd
:
 - $broadcasttext$&0 [&e$player&0 ]&r $multiargs
  required_args
: 1
  register
: true
  tab_completer
:
   '1'
:
  - give
   - msg
   - other
   '2'
:
  - money<pos_1=give><permission>test.test
   - $player_list<pos_1=msg >
  - something<pos_1=other >
  - always show
   '3'
:
  - bla bla
   - amount<pos_2=money>

MERCHANT_GUI :

You can now run's commands from the Merchant GUI.
Put your commands after the "<commands>" separator. You can put multiple commands by splitting them with the ";" semicolon character.
In order to work, you need to TURN ON the LISTENER from config.yml.
- LISTENERS > INVENTORY_LISTENER: true

Example:

Code (YAML):
merchant_command_example:
  command
: /merchantcmds
  type
: MERCHANT
  merchant_title
: "&3Merchant Example"
  merchant_items
:
  - STONE_SWORD:1<cost>EMERALD:5<max_uses>4<commands>/command here;/command 2 here
  - LEVER:1<commands>$text$&bYou've just bought a &3lever!
P.S. Some time is elapsed from the last release, i decided to release what i've done in this time anyway, without leaving it getting the dust for some other months, by these, some stuff are unfinished, like the toast messages.
----------, Oct 9, 2020

MyCommand 5.6.6


Built with Spigot 1.16.1 API

Info: I've decided to upload the file directly here on spigotmc.org (bukkit.org approvation times takes everytime longer and longer).
I'm saying this, because until the plugin get's approved on bukkitdev, the updater will says you that there is a new version (5.6.5). It will fix itself once the 5.6.6 is on bukkit.org

IconMenu's :

Updated the iconmenu_autofill field, now can support old server type item data values, enchantments, custom title and lore.

iconmenu_autofill: "STAINED_GLASS_PANE:14:true:&aHey&b$player: And this is the lore; line 2".

ITEM : DATA : ENCHATED TRUE OR FALSE : TITLE : LORE

runcmd:

Added "%PlayerOptionsFor%player_name%method: value" works only in runcmd for now.


chat:

Added the support for hexadecimal rgb colors.
Use the placeholder : "$hex%#123456% Text" to get the color you want.
But from what i can see, you can use '&x&f&f&f&f&f&f' aswell.


general:


Added "broadcast_radius: 100", with this option you can adjust how deliver the message, sending it only to the players inside a certain range. (This option works only with BROADCAST_TEXT type (or $broadcasttext$), not BROADCAST_RAW_TEXT)


utilities:

Added /mycmd tellnear <radius> <message>

placeholders:
Added $nearestplayer placeholder. Will return with "NoPlayer" if nothing is found.

Tab Completer :

- Added the $customnames_player_list placeholder for the tab_completer

Added a way to create permission based tab_completer suggestions.


Use the parameter <permission> to split the suggestion to the permission node area.

Example:

Code (Text):
 tab_completer:
  1:
  - Show this to members<permission>myperm.member
  - Show this only to vips<permission>myperm.vips
  - Show this to everyone

misc:

raw_text commands are now disabled only if it's a CraftBukkit server based.
cooldown-message now replace placeholders.

minor changes to the interface of certain commands.

"fixed" scoreboard commands npe on 1.16.1 servers
----------, Jul 5, 2020

MyCommand 5.6.5



Holograms
The stand used are now set to small type.
The location is now getting saved with the decimal part of the coordinate.



Cooldowns
Fixed bypass permission wasn't really working. (it showed the message but you've to wait anyway)

Changed language.yml COOLDOWN1: "&cWait $days$hours$minutes$seconds before you can use this command again"

If you're using custom cooldown-messages, please update with the new style.



new lines added in language.yml :


TIME_DAYS: "days "
TIME_DAY: "day "
TIME_SECONDS: "seconds"
TIME_SECOND: "second"
TIME_HOURS: "hours "
TIME_HOUR: "hour "
TIME_MINUTES: "minutes "
TIME_MINUTE: "minute "


PlaceHolderAPI placeholder :
Added %mycommand_cooldown_<command_name>% placeholder for PAPI. It will returns with the amount of seconds remaining.



MyCmd GUI :

New progress in /mycmd gui. Increased the size to 45 (1 row more). More mycmd-edit functions, once edit something from the ANVIL GUI return's automatically to the last ICONMENU menu, and minor adjustments.


Misc fixes and changes:

BROADCAST_RAW_TEXT now works with broadcast_message_permission_node
TEXT and BOOK and RAW_BOOK now support placeholders_replace_mode
BOOK and RAW_BOOK now can replace arguments typed too.

placeholders_replace_mode: NO_COLORCODE now will disable PLACEHOLDER_API, otherwise PAPI will replace colors for you.
Fixed TitleNotSet error if you've not closed correctly the /mycmd gui. Again, about other plugin, i can't resolve this problem.
Fix - If the amount of the anvil_left_item is zero it will automatically set to one

Fix - Added a message that prevents 1.7 and 1.8 servers from using BOSSBAR commands.

Removed Old colorcodes ex: $darkblue, $darkgreen ecc to make the process faster.





TEXT $text$ and BROADCAST_TEXT $broadcasttext$ addition :



Added "text_style: CENTERED" command field. It automatically center the text in the chat.



Added $rainbow_color (just randomly gives each letter a random color)





playerevents.yml now support the prefix "$RUN_CONSOLE$" that's allows you to run the command as console sender.


/mycmd-edit <here> now suggest the commands name in the tab autocompletions.
Some /mycmd-edit tab_completation now suggest the content of that field.



Scheduler :


Some updates to the probably older feature never touched in years.



The command list can now replace some placeholders.
Added /mycmd-scheduler add/remove <name> time 12:00 (In this way you can choose the precise minute when the task have to run the command)
Revamped some /mycmd-scheduler commands, added the tab_completer.

Some adjustment to the /mycmd help menu style (Under Spigot/Paper).
----------, May 14, 2020

MyCommand 5.6.4


Hover Menues (Ex. /mycmd) are now enabled on Paper servers too.

Security : Non OP Staffer players, can't create or edit anymore anything related to console. (Non OP Admin with the * permission, still need to be OP to operate).



Added /mycmd gui

Quick Look to the GUI
(Graphical interface to navigate through MyCommand features. Still work in progress, not complete 100%)



Added new command types :

-----------------------------------------
ANVIL_GUI :
Open up an Anvil graphical interface, that's allow you to execute commands and retrieve the text you type-in.

Code (YAML):
anvil_gui:
command
: /anvil_gui
type
: ANVIL_GUI
anvil_title
: '&eMyCommand &6ANVIL'
anvil_slot_text
: write here
anvil_left_item
: "BOOK:2:true:Write Here your lore;Line 2"
anvil_commands
:
- $text$ $player, you typed $output
- /broadcast $output
- ' %openiconmenu%/iconmenu $output'


anvil_left_item FORMAT : "ITEM_NAME:AMOUNT:true:LORE;MORE LORE"

> ITEM_NAME : AMOUNT : ENCHANTED TRUE OR FALSE : LORE's

To open-up an ANVIL GUI from one ICONMENU use the %openiconmenu% prefix and viceversa, from ANVIL to ICONMENU.



Credits to chasechocolate for the public resource.

P.S. I've noticed that can happen that the plugin will give you an error "Title not set". This happen if there is running another plugin who create IconMenu's and don't destroy them. I can't do too much for that.

------------------------------------------

RAW_BOOK command type.

Create Book's with clickable text, hover textes, run commands and open links. Check the RAW_TEXT command for more info's.


Code (YAML):
raw_book_test:
  command
: /rawbook
  type
: RAW_BOOK
  text
:
  - '&aHello &b$player! &aHover your mouse over me!\n\n\n; &dMAGIC<and>Second Hover Part\n\n\n; Hover text here<and> Ecc ...;ecc..'
  - 'TEXT\n\n;HOVER_TEXT<and>TEXT_2\n\n;Hover of text 2<and>$OPEN_URL$Go on my website\n\n;Hover part of the link;http://www.example.com<and>ecc ecc'
  - '&0 [&d*&0 ]&e Click me; &eClick Here for suggest the command &d/mycmd;/mycmd'
  - '$RUN_COMMAND$&0 [&e*&0 ]&c Set the time to day; &eClick for Execute;/time set day'
  - '$OPEN_URL$&0 [&e*&0 ]$random_color Open Google.com; &eClick for open;http://www.google.com'
------------------------------------------
Completly revamped the Holographic feature.

HOLOGRAPHIC_TEXT and BROADCAST_HOLOGRAPHIC_TEXT command types, now can show multiple lines, and update in real-time in the meanwhile.

/mycmd hologram can now manage and store holograms in it's hologram_databse.yml file, and you can now run commands through them.



/mycmd hologram create <name>
/mycmd hologram delete <name>
/mycmd hologram addline <name> <text>
/mycmd hologram removeline <name> <n>
/mycmd hologram editline <name> <n> <text>
/mycmd hologram movehere <name>
/mycmd hologram addcommand <name> <command>
/mycmd hologram deletecommands <holo_name>
/mycmd hologram switch <holo_name> (Change execution mode)
/mycmd hologram near <name>



Reload option added :

/mycmd-reload holograms



execute_mode option added :

execute_mode: HOLOGRAMS_ONLY

------------------------------------------

BlockSet:

Added a new command in block-set that's allow you to add and remove the usable items directly from the command

/mycmd-blockset manageblocks <add|remove> <left|right|physical>

------------------------------------------

Misc :

Removed some old and useless command and functions. Like /lmcmd and /mycmd-book(Still here this one, under /mycmd book)
If you're still using /lmcmd features, you can download the standalone version here
The package of the plugin changed name.

Added setWalkSpeed to PlayerOptions and fixed the setFlyingSpeed one.
Added compassTracker to PlayerOptions, or /mycmd compass if you want to enter it directly

Fixed the right-click interaction for 1.8 server NPC's
block-set create now take in consideration the item's inside the left click interaction.

config.yml :

LISTENERS.HOLOGRAM_LISTENER: true
HOLOGRAMS.DELAY_SEC: 5



language.yml - new lines

LANGUAGE:
HOLOGRAM_DELAY: "&cYou can interact again with this hologram in %ss"
NPCS_NO_COMMAND: "&cThis npc's doesn't have command(s) to execute."
SIGN_CREATED: "&aSign created! &2Check /mycmd-signset for more options."



Added show_bypass_message: true (Choose true or false if you want to show the bypass message on that specific command)



Added $target_X, $target_Y, $target_Z Placeholders. (Those 3 placeholder will return with the x y z of the target block)



executefor: ONLINE_PLAYERS now works in combination of "execute_mode: FROM_ANOTHER_COMMAND" or "CONSOLE_ONLY"



--------------------------------------------

TAB_COMPLETER:

Added some special placeholders who returns with the list of selected type.

Like $player_list who returns with the list of all the connected players in that server

The new one's are :

$server_operators (Returns with the list of the players with the OP status)

$world_player_list (Returns with the list of the players playing in the same world of the sender)

$worlds_list (Returns with the list of all the worlds running on the server)

$block_list (Returns with the list of all the Materials available on the game (Blocks and Items)

$potions_list (Returns with the list of all the Potion types)

$enchantments_list (Returns with the list of all the Enchantments types)

$sounds_list (Returns with the list of all the Sounds names)

$effects_list (Returns with the list of all the Effects names)

$particles_list (Returns with the list of all the Particles names)

$entity_list (Returns with the list of all the Entities type)



Example :

Code (YAML):
tab_completer_test:
  command
: /tct
  type
: RUN_COMMAND
  runcmd
:
 - $broadcasttext$&0 [&e$player&0 ]&r $multiargs
  required_args
: 1
  register
: true
  tab_completer
:
    '1'
:
   - $entity_list
    '2'
:
   - $potions_list
    '3'
:
   - $enchantments_list
    '4'
:
   - $sounds_list
    '5'
:
   - $effects_list
    '6'
:
   - $particles_list
    '7'
:
   - $block_list
    '8'
:
   - $server_operators
    '9'
:
   - $worlds_list

---------------------------------------------

Permissions Added/Changed

/mycmd gui - mycommand.gui
/mycmd book - mycommand.book (This command replace /mycmd-book)
/mycmd hologram - mycommand.hologram
/mycmd playeroptions - mycommand.playeroptions



----------------------------------------------

Added placeholders_replace_mode :

Allows you to choose what placeholders the command have to replace, when it runs a command. (Assured to work with RUN_COMMAND and similar.) Not implemented in other types.



NORMAL_MODE (Replace everything, default).
ONLY_ARGUMENTS (Replace only the $args (and $player) typed in).
NO_COLORCODE (Like NORMAL_MODE but no colors).
ONLY_COLORCODE (Replace only the color codes).
ONLY_PLACEHOLDER_API (Replace only PAPI placeholders.)
NO_CUSTOM_VARIABLES (Like NORMAL_MODE but no variables created with /mycmd-variables).

Become :

mycmd:
placeholders_replace_mode : ONLY_ARGUMENTS



MyCommand v5.6.3 (Missing changelog on spigot)


IconMenu's :
- Dynamic IconMenu's can now be closed with ESC key.
- Dynamic IconMenu's now refresh properly without getting the item on the hand refreshed aswell.





CALL_URL
- Added "get_json_string: variable" (You can now retrive a specific json variable value)
- Added "get_run_command: /command $output" (You can now execute a command when the request ends)

Scripts
- Added .string.length<



Added %PlayerOptions%spawnParticle: PARTICLE_NAME:INTENSITY (Debug it with /mycmd playeroptions spawnParticle PRESS_TAB_HERE:100

warmup and cooldown command fields now applies to the mycommand.bypass.warmup and mycommand.bypass.cooldown permissions.

Misc : Added LISTENER.INVENTORY_LISTENER: true in config.yml (by default is true)
----------, Apr 28, 2020

Iconmenu's :

Added the support for custom playerhead texture to be used inside the ICON_MENU command types.
Place the texture "code" instead of the player name to get what desidered.


Code (YAML):
textured_head_iconmenu:
  command
: /texturedhead
  type
: ICON_MENU
  iconmenu_title
: '&cTextured heads example'
  iconmenu_size
: 18
  iconmenu_commands
:
 - "0:PLAYER_HEAD%eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzY2NGU1NGU3NjI4N2UzZmUyYmQzOTdjMDk4ZWU3YTRiZDBmOWM4OGY5MzlmZGU4YmFiNzhjMzI3MWE0NjE4ZiJ9fX0=:0:%stayopen%:Discord Server:link"
  - "9:PLAYER_HEAD%eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNDRiOThlODQyZTMyNzMzYTdlNzVlMDJjZDU5NDRmYWNjNTAyNzg1ZTE1ZTE2ZWZiN2FkMGJiNDZhZGZmMTVmNiJ9fX0=:0:%stayopen%:Youtube Channel:link"
  - "17:PLAYER_HEAD%eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNWQ5YzkzZjhiOWYyZjhmOTFhYTQzNzc1NTFjMjczODAwMmE3ODgxNmQ2MTJmMzlmMTQyZmM5MWEzZDcxM2FkIn19fQ==:0:%close%:Go Back:go back"
  iconmenu_autofill
: WHITE_STAINED_GLASS_PANE






Dynamic Iconmenu addition:
It's now possible put multiple commands on the same slot.



Code (YAML):
- '1:ITEM_1<next>ITEM_2:0:/COMMAND1<next>/COMMAND_2:TITLE_1<next>TITLE_2:DESCRIPTION_1<next>DESCRIPTION_2'



Fixed $text$ in ICON_MENU not working.



PlayerData /mycmd-playerdata command :
You can disable the output of the "edit" by adding _silent suffix to the operation you're doing. Example /mycmd-playerdata add_silent PlayerName coins 1 , or remove_silent ecc...



Added "disable_on_length" command field. This one allow's you to disable MyCommand is the length of arguments typed in the prompt is higher than the set number


Example, with disable_on_length: 1 , and i have the /ignore command, typing only "/ignore", mycommand will execute the command normally. If i type "/ignore <anything>", mycommand will not get triggered, and the original command ignore will run.
----------, Mar 12, 2020

Built with spigot 1.14.4 API's.



Main:
It's now possible give more command TYPES to one command.

To do so, instead of placing the TYPE right afer "type", put them below like a list.

Code (Text):
command_name:
type:
- TEXT
- RUN_COMMAND


You can still use the old way of setting up the command type, infact the plugin is completly compatible and usable in the old way.

Not every type works well togheter or work at all, but overall, if you want, it's here.



The consequence of this lead me to remove those 2 now obsolete command type (RUN_COMMAND_TEXT and RUN_COMMAND_BROADCAST_TEXT). If you are using one of these 2 type, please update your command like the example above.



Args:

Added DEBUG.REPLACE_ARGS_WITH_NOTHING_IF_EMPTY: true in config.yml (This function will replace any empty $arg with "" nothing)



Mycmd-npc's function :

"/mycmd-npcs changetype <id> <type>" now change Villager types instead of the old professions list (DESERT, JUNGLE, PLAINS, SAVANNA, SNOW, SWAMP, TAIGA)
New command "/mycmd-npcs changeprofession <id> <type>" change as it says the professions of a Villager. Values can be (NONE, ARMORER, BUTCHER, CARTOGRAPHER, CLERIC, FISHERMAN, FARMER, FLETCHER, LEATHERWORKER, LIBRARIAN, MASON, NITWIT, SHEPHERD, TOOLSMITH, WEAPONSMITH)
(Old Version compatibility added)





Added a LEADERBOARD command type.



Sort playerdata number values by the highest amount. Configure it using the new field "playerdata_value" , "leaderboard_size" and "leaderboard_text"



PlaceHolders : $index , $username , $points

Code (Text):
leaderboard_coins:
command: /topcoins
type:
- TEXT
- LEADERBOARD
text:
- "&dCoins Leaderboard :"
playerdata_value: coins
leaderboard_size: 20
leaderboard_text: "&a$index: &b$username &a- &b$points"

Added a BOOK command type.
Open up a Book GUI without the need of having a book in the inventory.

Code (Text):
book1_test:
command: /booktest
type: BOOK
text:
- "&2Hello &a$player\n\n\n&3This is a book created with \n&9       MyCommand!\n\n\n\n\n\n\n\n &d         -->&5 Next Page"
- "Write what you want here!"
book_title: MyCommand
book_author: emmerrei
book_add_to_inventory: false


IconMenu's command type:

Added a way to set RGB colors to the IconMenu POTION Items. (POTION, SPLASH_POTION and LINGERING_POTION)

Put the values like the playerhead name way, splitted by <rgb> 0 to 255 max.

Code (Text):
 iconmenu_commands:
  - 1:POTION%255<rgb>120<rgb>0:0:/say hey:COLOR RGB TEST:RGB TEST
%stayopen% now works with execute_mode.

Added $RUN_CONSOLE$ prefix (before the command). This allow's you to execute the command directly as console.
Fixed an exploit.



PlayerData :
Added MYSQL.AUTO_RECONNECT in config.yml (true or false)



Placeholders :
Added : $hasemptyinventory (return true or false) and $inventorysize (return as a number of items inside the inventory)
Example : $Script$%if%$hasemptyinventory==true or $Script$%if%$inventorysize==0 (Empty inventory) $Script$%if%$inventorysize==41 (Full Inventory)

Added $randomnumber%25<to>50% Placeholder. It will return a number between the 2 numbers.





Cooldown's :
Added "cooldown-message" make you be able to customize per-command cooldown's messages.



Scoreboard's:
Fixed the support for old server versions 1.12<



Itemset:
Fixed $targetentity triggering 2 times instead of once.



RUN_COMMAND command type:
Added $RUN_CONSOLE$ prefix. Using this live allow's you to run command by the console, per line, where required.


Code (Text):
mycmd:
command: /test
type: RUN_COMMAND
runcmd:
- "/runthisfromgame"
- "$RUN_CONSOLE$/andmefromtheconsole"


$log$ - Custom Logger
It's now possible save logs text in separate log file. Just use log_filename: "filename.log" like the exampel here below, and the $log$ message will get saved in "/plugin/MyCommand/logs/filename.log"



Code (Text):
my_custom_logger:
command: /mylog
type: RUN_COMMAND
runcmd:
  - "$text$&aThis log file is getting saved in &2/MyCommand/logs/filename.log"
  - "$log$[$player] $multiargs"
log_filename: filename.log


Added $rawtext$ , $rawbroadcasttext$ . Allow's to send MyCommand RAW Text's formatted text's to players directly from runcmd.

How to use : Both act the same way of the other placeholder like $text$



Added "$Script$%if%HasNotPermission==perm.node" does the inverse of HasPermission.



Playerevents.yml



Added $PERFORM_COMMAND$ .Placing it before the command you need to run (like in quit or kick event) to perform only a registered command. (This function is for compatibility with VentureChat and similar)
PlayerInteractEvent -> Added an antiflood function. By default is 3 Sec. Added "INTERACTION.DELAY_SEC: 3" in config.yml , and "LANGUAGE.INTERACTION_DELAY" in language.yml



Added a way to communicate to the BungeeCord Proxy and allowing the execution of proxy commands.


Preparation :

1. Place the MyCommand_BungeeCord.jar file inside the BungeeCord plugin folder
2. Open up the config file of the Main MyCommand (config.yml) and put PLUGIN_MESSAGE_LISTENER on true

3. Done. Restart proxy and server.



How to use in MyCommand Spigot side.

Use those placeholder at the start of a runcmd line to execute commands on the BungeeCord Proxy. Or use /mycmd bungee (to debug stuffs).



Code (Text):
bungeecord_bridge_example:
  command: /bcb_execute
  type: RUN_COMMAND
  runcmd:
  - "$bungeecord_execute$command_to_execute_on_the_proxy"
 
  runcmd:
  - "$bungeecord_runasproxy$command_to_execute" #It run's the command's as the proxy and not the player. This is like RUN_CONSOLE, it will bypass any permission.
 
  runcmd:
  - "$bungeecord_chat$Chat as a player or execute /server commands NOT PROXY one's"
 
  runcmd:
  - "$bungeecord_broadcast_message$PRIVATE MESSAGE to the sender"

  runcmd:
  - "$bungeecord_broadcast_message$BROADCAST MESSAGE on whole PROXY"


REMOVED STUFFs:

$script$HasEmptyInventory who wasn't even working right now. Replaced with the new placeholders : $hasemptyinventory and $inventorysize . Use them in a if condition.





MyCommand for BungeeCord v1.0


MyCommand_BungeeCord.jar isn't just a bridge for the local MyCommand plugin.



I've added some features that's make it a bit more useful.


It's possible create non registered commands directly on the MyCommand_BungeeCord proxy side plugin.



What you can do is to create simple TEXT commands, or RUN_COMMAND and RUN_AS_PROXY one's. There is the support for some features, like the multiple commands in a list, $delay$ and some placeholders.
It is a fresh plugin, it doesn't have any of the MyCommand feature beyond these i've written



Examples :

Code (Text):
run_command_example:
command: /bungeeruncmd
type: RUN_COMMAND
runcmd:
  - "$text$&eHello &2$player! &bTesting TEXT"
  - "$delay$/alert 3"
  - "$delay$/alert 2"
  - "$delay$/alert 1"
  - "/do something"
permission-required: true
permission-node: "bmycmd.runcommand.test"
permission-error: "&cYou can't use this command!"
delaytimer: 1
run_as_proxy_ex:
command: /gotolobby
type: RUN_AS_PROXY
runcmd:
  - "/send $player lobby"
  - "$text$&eTeleported to lobby."
permission-required: false


Main Commands :


/bmycmd (Permission: bmycmd.admin).
/bmycmd reload
/bmycmd list
/bmycmd check <command>
/bmycmd runasproxy <command>



bmycmd.admin permission also allow's you to run every command you create.



If you don't want to use those features, you can disable the Listener in the config.yml and the impact it will be zero. (if there is any).
Turning off the custom command feature, it always leave the Bridge working allowing server-side MyCommand to communicate with the proxy.
----------, Oct 31, 2019

Built with spigot 1.14.3 API's.



IconMenu's commands now support execute_mode
USE_AT_SELECTORS_PLACEHOLDERS is now by default "false"
Reworked the console support for $delay$ and $delay$<123>. (runcmd != text field. With the second one, results still can be differents. runcmd now act as the player counterpart.)



$Script changes :
Double values are now rounded at 2 decimal digits only. (Edit that in config.yml DEBUG.ROUND_DOUBLE_DECIMALS_AT: 2)
Added "/mycmd-playerdata divide" and "/mycmd-playerdata multiply"





tab_completer can now be costumized by positions, and support placeholders too.

Special PlaceHolder for the tab_completer only : $player_list (It returns with a list of the online players)

Code (Text):
tab_completer:
 1:
 - set
 - add
 - remove
 2:
 - $player_list
 3:
 - money
 - gold
 - credits
 4:
 - amount
 - $rnd6

Added a new command type "LIVE_CHAT". (Proof of concept)


Basically the chat become a prompt. Until the player gives the correct answer it will asks for it. If correct it will launch a command.
(Note: runcmd here is working only as a list, it hasn't the features of a RUN_COMMAND.) Use it in conjunction of execute_mode to be able to concatenate more commands and more questions.



If you want to use this feature, you need to enable the "CHAT_LISTENER: true" in the main config.yml. Done that, restart the server.

Code (Text):
live_chat_example:
 command: /livechat
 type: LIVE_CHAT
 text:
 - "&aHow much is '2 + 2'"
 - "&aWrite your answer in the chat!"
 answer: "4"
 success-message: "&bQuick math!"
 runcmd:
 - "/me minus 1 that's 3!"



Added "disable_on:" config option feature.
This feature allow's you to disable the command if the typed-in command match the one inside the "disable_on" list


Code (Text):

pets:
 command: /pet
 type: RUN_COMMAND
 runcmd:
 - '/shop pets'
 disable_on:
 - /pet summon creeper



Added 2 placeholder for checking if a player is part or the owner of a WG region : (return true or false)
$wgisowner , $wgismember





MERCHANT command type Items are now customizable by their name, enchantments and lore.

-> - DIAMOND_BLOCK:1STONE_SWORD:1:0 :DAMAGE_ALL;1;FIRE_ASPECT;1:&3Old Sword:&bA very old sword4


Added PlayerInteractEvent in playerevents.yml



Code (Text):
PlayerInteractEvent:
 active: true
 cancel_event: true
 materials:
 CHEST:
 - $broadcasttext$&a$player &2touched a chest!
 COBBLESTONE:
 - /say yeah



cancel_event on false will allow players to execute the command and still open the chest or whatever interaction they are doing on the target block.





Added more Placeholders : $location , $getbedlocation (both return with mycmd location format. bedlocation if not setup, will return with "not found")



Example :



Code (Text):
bedlocation_script:
 command: /checkbed
 type: RUN_COMMAND
 runcmd:
 - $Script$%if%$getbedlocation==not found
 - $text$&cCan't find the bed location
 - $Script$%else%
 - $text$&aTeleporting to your bed
 - "%PlayerOptions%teleport: $getbedlocation"



Added "%PlayerOptions%spawnFirework: true" (Spawn a random firework... yes)



Added
$CheckPlayerStatus%Player_Name%hasPlayedBefore%

Fixed dynamic ICON_MENU with empty lore lines, now should work also if that field is "" instead of " ";
Suppressed a EOFException error in the PluginMessageEvent
----------, Jul 20, 2019

Built with spigot 1.14.1 API's.



Added the support for older bukkit/spigot server version. 1.13, 1.12 and maybe older one's should work fine.



Dropped Metrics MCStats for bStats. https://bstats.org/plugin/bukkit/MyCommand


Implemented an At (@) selector parsing method made by md_5. (Deactive it in config.yml under DEBUG, voice USE_AT_SELECTORS_PLACEHOLDERS: true (by default))



BREAKING CHANGE : Fixed a typo on those 2 script lines .args.length> and .string.length> , update your commands if you used them.



Added /mycmd playeroptions <method> <values> ( Basically %PlayerOptions% in a command. Use it for debug or whatever. Complete of tabcompleter, with a comprehensive list of POTION, ENCHANTMENTS, SOUND and EFFECT'S names.)



Added /mycmd editcooldown <player> <command_name> <time> (Allow's you to manage active cooldowns.) "/mycmd editcooldown <player>" Show's player active cooldowns.


New RunAs sub-commands : /mycmd-runas team and /mycmd-runas tag



New Placeholders : (Both returns with the player sender teams and tags.)
$teams
$tags



New PlayerOptions :



'%PlayerOptions%removeItem: MATERIAL_NAME:AMOUNT' works the same as %PlayerOptions%addItem (It will remove only the same exact ItemStack, it doesn't subtract items from a existing one)

'%PlayerOptions%withdrawItems: MATERIAL_NAME:AMOUNT:ITEM_DISPLAYED_NAME' #This works like the itemcost feature.
'%PlayerOptions%deleteSingleItem: MATERIAL_NAME:AMOUNT:ITEM_DISPLAYED_NAME' #This will remove a complete ItemStack from the inventory of a desider type. Amount number is superfluous
'%PlayerOptions%deleteAllItems: MATERIAL_NAME:AMOUNT:ITEM_DISPLAYED_NAME' #This will remove all the ItemStacks of a certain type from the inventory. Amount number is superfluous
'%PlayerOptions%addScoreboardTag: tag_name'
'%PlayerOptions%removeScoreboardTag: tag_name'
'%PlayerOptions%addEnchantment: ENCHANT_NAME:LEVEL'
'%PlayerOptions%removeEnchantment: ENCHANT_NAME'

And other one's : %PlayerOptions%openWorkbench: NAME, %PlayerOptions%openInventory: NAME, %PlayerOptions%openMerchant: ITEM..ecc, %PlayerOptions%openEnchanting, %PlayerOptions%setCursorOpenInventory: ITEM





Added "%TempVariable%VarName.tolowercase"



Example :
Code (Text):
runcmd:
  - "%TempVariable%VarName=$iteminhand"
  - "%TempVariable%VarName.tolowercase"
  - "$text$&aTemp Variable -&3 VarName"
 



New Type of PlaceHolder added :


$CheckPlayerStatus%Player_Name%Status%. ( This one allow's to create more precise condition in a if/else statment. (all returns with true or false))

Example :

Code (Text):

 runcmd:
 - $Script$%if%$CheckPlayerStatus%$arg1%isOnline%==true
 - /playerisonline
 - $Script$%else%
 - /notonline
 
All fields : isOnline, isOnGround, isDead, isFlying, isSwimming, isSneaking, isInsideVehicle, isSprinting, isSleeping, isOp





Added MERCHANT command type.


This one will open to you a Merchant Item GUI, where you can buy stuffs. Configurable.

ITEM_TO_SELL<cost>ITEM_NEEDED_TO_BUY_1:AMOUNT<cost>ITEM_NEEDED_TO_BUY_2:AMOUNT<max_uses>10

<max_uses>N -> Determinate how many times one thing can be bought.

Code (Text):

merchant_example:
 command: /mymerchant
 type: MERCHANT
 merchant_title: '&3Hello &b$player'
 merchant_items:
 - STONE_SWORD:1:0:DAMAGE_ALL;1;FIRE_ASPECT;1:&3Old Sword:&bA very old sword<cost>GOLD_INGOT:20<max_uses>2
 - STONE_SWORD:1<cost>EMERALD:5<max_uses>4
 - IRON_BLOCK:1<cost>EMERALD:1<cost>GOLD_INGOT:1
 - GOLD_BLOCK:1<cost>IRON_INGOT:10
 - EMERALD_BLOCK:1<cost>GOLD_INGOT:50
 - DIAMOND_BLOCK:1<cost>GOLD_INGOT:50<cost>EMERALD:50
 - LEVER:1
 - COBBLESTONE:1
 
Added HOLOGRAPHIC_TEXT and BROADCAST_HOLOGRAPHIC_TEXT command type.


This will spawn a floating text in front of the player sender. No NMS code, so only one line at the time. HolographicDisplays exist if you want nms features.

Code (Text):

holographic_example:
 command: /holoexample
 type: HOLOGRAPHIC_TEXT
 text:
 - "&eHello $player, how are you?"
 - "$random_coloryeah, i'm fineeeee thanks!"
 - "&dCurrent time &5$time"
 delaytimer: 3
 


ICONMENU :
Added a way to set_up itemflags.
Code (Text):

 iconmenu_itemflags:
  - HIDE_ATTRIBUTES
  - HIDE_DESTROYS
  - HIDE_ENCHANTS
  - HIDE_PLACED_ON
  - HIDE_POTION_EFFECTS
  - HIDE_UNBREAKABLE
 


BLOCK_PATTERN Additions :
Added %PlayerOptions%undoPattern or simply for admin's "/mycmd undo". Allow to restore the latest BLOCK_PATTERN command used. Only the last one used, be aware.


Code (Text):
mycmd-undo:
  command: /mycmd-undo
  type: RUN_COMMAND
  runcmd:
  - "%PlayerOptions%undoPattern"

Fixes :
TITLE command type, "effect_type" config option, is now by default 0. (it was a mistake the default on 1)
PlaceHolder API's MyCommand variables %mycommand_playerdata_<variable_name>%, %mycommand_playerdatafor_<playername>_<variable_name>% and %mycommand_variables_<variable_name>%, now supports variables with underscore in the name.
$NoReplace now work's from console.



Removed some old thing's like Spout...
Better TabCompleter for /mycmd tell (now show a list of placeholder)
Minor GUI changes.
----------, May 19, 2019

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).




5.4.2



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.

example :



itemcost: IRON_SWORD:1:SUPER IRON SWORD;GOLDEN_CHESTPLATE:1:&eULTRA ARMOR





3.)Added 2 new variables for PlaceHolder API
- %mycommand_playerdatafor_<playername>_<variable_name>%
- %mycommand_variables_<variable_name>%


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).

- DYNAMIC
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



[​IMG]



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 line. The effect 1 will print the message letter by letter.

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.





dynamic_title_example:
command: /dyntitle
type: TITLE
text:
- "&aHello &e$player"
- "This will be printed one letter at the time."
title:
effect_type: 1




7.) New Player Options Added :



%PlayerOptions%setItemInHandDisplayedName: &aItemName
%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.



Example :

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.
----------, Apr 16, 2019

Built with spigot 1.13.2
Check on bukkitdev for the full changelog.
----------, Mar 6, 2019

  • Added the support for the older craftbukkit/spigot version (1.8 and 1.7) (You must be able to use itemset and blockset again)
  • Added the Updater check. Tell you when is available an new version of the plugin. (DEBUG.USE_THE_UPDATED to false, for disable it)
  • Removed some useless old scripts SetInteger,Integer,String
----------, Apr 28, 2016

Resource Information
Author:
----------
Total Downloads: 283,874
First Release: Apr 24, 2016
Last Update: Jul 4, 2023
Category: ---------------
All-Time Rating:
245 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings