MyCommand
MyCommand
Donations
If you like this plugin, and want to offer me a coffee, consider to click the button on the top right corner of the navbar to donate! Thank you :D
Make your own, customized Minecraft commands
Features:
- Make new commands!. (Also registered command)
- Run others command in new one
- Perform several commands in one
- Delayed commands with custom pause, warmups and cooldowns
- Make Shortcut/alias commands or override commands.
- Run commands with any item , block, signs or even (villager) NPC's.
- Various functions for costumize commands, like placeholders, scripts (if-else) and more.
- Console support
- Economy support (Require Vault)
- All features are highly customizable
- No command limits with multiple file support
- Customizable IconMenu (ChestGUI), ActionBar, BossBar, Hover/ClickableText, Title and Scoreboard commands.
- Allow the execution of commands in various circumstances (per world, by worldguard regions and more.
- Custom players database where you can store anything you want to personalize even more your commands. SQL database supported.
- BungeeCord feature, Scheduler, Join/Quit/Death events, PHP/GET request ...
- ... And much, much more..!
Configuration and examples (Documentation)
Commands & permissions
Video Tutorial :
(French) Getting Started (TEXT and ALIAS commands) by Texier (MyCommand 5.5.0)
(English) by Koz4Christ. (MyCommand 5.1.8)
If you have to report an error in the chat, or just a command section, use pastebin or a similar website. Help with YML code error : http://yaml-online-parser.appspot.com/
This plugin uses bStats Metrics - MyCommand stats page
@UndeadJ3T
Try this :
Where /eco = your economy command.
How do i make so all players on my server get 5K when i type a command? is that possible?
@robi0294
Ah, ok, but ..no, you can't do that in the iconmenu, for now.
About the cooldown feature, it's already implemented for other plugin commands (COOLDOWN and WARMUP command type), i have to implement in some way this thing also for custom command part of the plugin.
Instead about the script, depends what you want. In the current code, if one player have "mycmd.default" permission, the command always execute only the first if. If you want execute (for example) only the kit gold, remove the default permission to the player, or, put the "mycmd.default" condition, for last. Instead, if you want execute every true if, change the elseif back to a normal if.
@Ivanpro
I don't think you know what i mean. I read the whole example page, I want it so when i click the icon, in the iconmenu, it dosn't close, BUT i also wanna add a command to that. So when i click the iron, it runs the command, but dosn't close the menu.
And the cooldown, i want it to show how long, it takes before the cooldown is over.
example. I select a kit or whatever, 5 mins cooldown. i try to use it again before 5 mins is over, it just says 'please wait till the cooldown is over'. Is it possible to make it like 'You need to wait x minutes more before you can use it again'
Thanks :)
Can i please get you to edit this file, so it does what i want. I still cant get it to work.. Please :P
'kits':
command: /kits
type: RUN_COMMAND
runcmd:
- $Script$%if%$HasPermission==mycmd.default
- $text$&aDefault&f, &aTools&f, &cStone&f, &cIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.stone
- $text$&aDefault&f, &aTools&f, &aStone&f, &cIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.iron
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.gold
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.diamond
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.titan
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &aTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.hawk
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &aTitan&f, &aHawk
- $Script$%elseif%$HasPermission==mycmd.mod
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%elseif%$HasPermission==mycmd.modplus
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
permission-required: false
@Ivanpro
Yes, I'm using the command /minecraft:tellraw and i have no problems, works perfectly. The only downside is that it is a little messed up to write, that's all :)
@robi0294
The if works in this way : If true = do only the things below the true IF. If you want execute all the commands, remove the elseif then.
The iconmenu, there is an example in the exampels page, just copy paste it. (Works only on the latest build of MyCommand, so update first).
Cooldowns and playerdata are 2 different things. So, what do you need? Check the examples page and look if you find something useful for you.
@Marchio98
Quella funzione è sempre stata solo abbozzata, visto anche che funziona solo su Spigot, ed aggiungere il supporto al bukkit, significa creare un MyCommand che si rompe ad ogni aggiornamento di minecraft. In ogni caso, il problema principale è trovare un modo per implementare via testo quelle funzioni, per il momento, la cosa è singola, quindi l'ho creata facilmente asd. Vedrò in futuro. L'alternativa è utilizzare direttamente il comando di default di minecraft /raw qualcosa, ed inviare il testo in json.
Hello.
It still dosn't seem to work. Now it just only shows the stone condition.
Also, the iconmenu. I can't get it to add mutliple commands. But what i wanted, was that the menu dosn't close when i click on an item, that has a command binded to it.
I also wanna know about the cooldown. I know it's properly something with the playerdata, is it possible you can help me with it? :)
Best regards.
Robin
@Ivanpro
Thanks a lot, so.. I've a suggestion for future updates:
Add with raw_text the possibility to use hover variable on a part of a line (I hope it is understandable xD)
Thank you!
@Marchio98
Nope, currently with raw_text you can do only one thing for line.
@MCDrgo001
Never used that, but i think you have to register the command first. Put "register: true" under the interested command.
@robi0294
Just put that string in the "command" space. There is an example in the "examples page". For the script, just put the default condition "mycmd.default", for last.
Is it possible to add a MyCommand command to Essentials' help file (without editing the file manually)?
The plugin documentation shows that to add a command from a certain plugin to the help file, I should give the user the permission essentials.help.[pluginname].[command] (both arguments in [] lowercase).
The command is called 'gotohub' and can be run using /hub. I've already tried giving a player the permissions essentials.help.MyCommand.hub, essentials.help.mycommand.gotohub, essentials.help.mycommand.hub.
Hello again.
I really cant get the %stayopen% to work... can you possibly do an example of where to put it in?
Also, the problem i had with the different types of permissions for different ranks, now, no matter what, only shows the first one message, which is the default rank's message. I replaced the other ones with %elseif%, do you have an idea of what it might be?
I also wanna ask, if it's possible to add the specific time of the cooldown message? Like, whats left?
Best regards.
Robin
@Ivanpro
Is it possible to do this?:
@FriedRyan
Currently you can't add the "skin" to the SKULL_ITEM. I have added this in the next release.
@robi0294
Because RUN_COMMAND require runcmd: and not text: . Anyway, in this "way", if one player have all this permissions, he get all the messages. Use elseif instead of if from the second if and the next one. And yes, you can add multiple commands in the icon menu (split them with the ";") and yes, you can add %stayopen% for keep open the iconmenu.
@KyBLKuBA
? The $player placeholder is already the sender name. What do you need?
@Ivanpro
I am trying to use my player head as the icon in the iconmenu, but I can not get past the Steve head, I have it set to SKULL ITEM and 3 for item data, but I don't know how to use the format to add skull owner! Thanks.
Hello, I'm trying to get the $HasPermission to work.
I want it, so if u have x permission - it shows a different message.
For example. I have the donation ranks to show more 'green' kits. How do i get this to work? Right now, it says Empty in chat whenever i try to type the command.
This is what i have:
'kits':
command: /kits
type: RUN_COMMAND
text:
- $Script$%if%$HasPermission==mycmd.default
- $text$&aDefault&f, &aTools&f, &cStone&f, &cIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.stone
- $text$&aDefault&f, &aTools&f, &aStone&f, &cIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.iron
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &cGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.gold
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.diamond
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.titan
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &aTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.hawk
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &aDiamond&f, &aTitan&f, &aHawk
- $Script$%if%$HasPermission==mycmd.mod
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%if%$HasPermission==mycmd.modplus
- $text$&aDefault&f, &aTools&f, &aStone&f, &aIron&f, &aGold&f, &cDiamond&f, &cTitan&f, &cHawk
- $Script$%else%
- $text$gg
permission-required: false
also..... is it possible to add mutliple commands to a icon menu item? if i want it so when they click something in the menu, it dosnt close the menu, but keeps it open?
best regards:
robin
@GodsDead
I think the easiest way to deal with this would be vanilla scoreboards. Make a scoreboard value 'DonationLeft' with '/scoreboard objectives add DonationLeft dummy'.
Then make a scheduled, daily command '/scoreboard players add ?Server? DonationLeft 1'
For the MyCMD command for promotion, you could have the following:
Thus, you could have the payment plugin execute '/PromoteDonator <playername>', and have their DonationLeft value set to 61 days greater - that is, two months - than the server's current DonationLeft value, which increments daily.
61 days, or two months later, this value has decreased to 0.
For the expiration command, you'd need to do '/scoreboard objectives add temp dummy'
To view the amount of days remaining, the following command could be used:
This will tell the player the amount of days they have remaining. This can also be modified to display the hours and minutes remaining. I hope this helped.
I have a Request too,
Simple and easy to use: Creating Lists from Ingame or in config
For Example (Peter) types:
/list add (list) Hey Whats up!
And (Anna) Types:
/list add (list) Hello There.
Now John types /list clear (player) to remove all Inputs inside the a list of a Player or John types /list clearall (list) to remove all Inputs inside a list of all Players
@KyBLKuBA
+
I know you must be bombarded by questions and requests, but I'm back again to request a relatively small feature.
It would be great if we could have a variable for the full stack data in hand, or, even better, for any inventory slot.
For example, $stackdata%35% to input the following:
{id:"minecraft:stick",Count:1b,tag:{ench:[0:{lvl:2s,id:19s}],display:{Name:"§7Grandmas Walking Stick"}},Damage:0s}
If the player held a Grandmas Walking Stick in Slot 35.
This would allow us to create auction, trade and other item-related features that, to my knowledge, can't be created currently.
Thanks in advance.
EDIT:
Oh, I completely forgot, Grandmas Walking Stick is an item from SF, having the above NBT on it.
Hello! I would like to ask is there a way to compare or do maths on dates?
I am planning on showing donators how long they have left on their donation from buycraft, so far I have got buycraft to save the players Donation date for their rank into playerdata, this is a good start, and I can edit the format of the date in the scheduler to match it, I can display both this information, what I want to do is display how many days left they have until their donation expires! Since we can get the current date and we have the donation date, we should be able to do this? All ranks last for 2 months, the format for the buycraft donation date is 06/06/16, if a donation lasts 2 months we need to add on 2 months to this donation date to find the expiry date, once we have this we can check $todaydate to see how many days away it is. I just cant figure out how to work with dates in mycommand?